Changeset 7758
- Timestamp:
- 04/24/12 15:22:13 (13 years ago)
- Location:
- branches/ProblemInstancesRegressionAndClassification
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemInstancesRegressionAndClassification/HeuristicLab 3.3.sln
r7754 r7758 31 31 EndProject 32 32 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.Instances.TSPLIB.Views-3.3", "HeuristicLab.Problems.Instances.TSPLIB.Views\3.3\HeuristicLab.Problems.Instances.TSPLIB.Views-3.3.csproj", "{B7FA451C-26BF-4EE5-8E0E-BECAADA5B8E9}" 33 EndProject 34 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.DataAnalysis.Symbolic-3.4", "HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj", "{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}" 33 35 EndProject 34 36 Global … … 224 226 {B7FA451C-26BF-4EE5-8E0E-BECAADA5B8E9}.Release|x86.ActiveCfg = Release|x86 225 227 {B7FA451C-26BF-4EE5-8E0E-BECAADA5B8E9}.Release|x86.Build.0 = Release|x86 228 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 229 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|Any CPU.Build.0 = Debug|Any CPU 230 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 231 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|Mixed Platforms.Build.0 = Debug|x86 232 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|x64.ActiveCfg = Debug|x64 233 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|x64.Build.0 = Debug|x64 234 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|x86.ActiveCfg = Debug|x86 235 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|x86.Build.0 = Debug|x86 236 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|Any CPU.ActiveCfg = Release|Any CPU 237 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|Any CPU.Build.0 = Release|Any CPU 238 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|Mixed Platforms.ActiveCfg = Release|x86 239 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|Mixed Platforms.Build.0 = Release|x86 240 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|x64.ActiveCfg = Release|x64 241 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|x64.Build.0 = Release|x64 242 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|x86.ActiveCfg = Release|x86 243 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|x86.Build.0 = Release|x86 226 244 EndGlobalSection 227 245 GlobalSection(SolutionProperties) = preSolution -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj
r7754 r7758 141 141 <Private>False</Private> 142 142 </Reference> 143 <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4">144 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll</HintPath>145 <Private>False</Private>146 </Reference>147 143 <Reference Include="System" /> 148 144 <Reference Include="System.Core"> … … 197 193 </ItemGroup> 198 194 <ItemGroup> 195 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj"> 196 <Project>{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}</Project> 197 <Name>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</Name> 198 </ProjectReference> 199 199 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj"> 200 200 <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project> -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs
r7259 r7758 107 107 } 108 108 } 109 110 public override void ImportProblemDataFromFile(string fileName) {111 ClassificationProblemData problemData = ClassificationProblemData.ImportFromFile(fileName);112 ProblemData = problemData;113 }114 109 } 115 110 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs
r7750 r7758 113 113 } 114 114 115 public override void ImportProblemDataFromFile(string fileName) {116 ClassificationProblemData problemData = ClassificationProblemData.ImportFromFile(fileName);117 ProblemData = problemData;118 }119 120 115 public void Load(ClassificationData data) { 121 116 Name = data.Name; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj
r7754 r7758 141 141 <Private>False</Private> 142 142 </Reference> 143 <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4">144 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll</HintPath>145 <Private>False</Private>146 </Reference>147 143 <Reference Include="System" /> 148 144 <Reference Include="System.Core"> … … 192 188 </ItemGroup> 193 189 <ItemGroup> 190 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj"> 191 <Project>{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}</Project> 192 <Name>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</Name> 193 </ProjectReference> 194 194 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj"> 195 195 <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project> -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs
r7259 r7758 111 111 } 112 112 } 113 114 public override void ImportProblemDataFromFile(string fileName) {115 RegressionProblemData problemData = RegressionProblemData.ImportFromFile(fileName);116 ProblemData = problemData;117 }118 113 } 119 114 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs
r7750 r7758 116 116 } 117 117 118 public override void ImportProblemDataFromFile(string fileName) {119 RegressionProblemData problemData = RegressionProblemData.ImportFromFile(fileName);120 ProblemData = problemData;121 }122 123 118 public void Load(RegressionData data) { 124 119 Name = data.Name; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r7734 r7758 50 50 <DebugType>pdbonly</DebugType> 51 51 <Optimize>true</Optimize> 52 <OutputPath> $(SolutionDir)\bin\</OutputPath>52 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 53 53 <DefineConstants>TRACE</DefineConstants> 54 54 <ErrorReport>prompt</ErrorReport> … … 94 94 <ItemGroup> 95 95 <Reference Include="ALGLIB-3.5.0, Version=3.5.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 96 <HintPath>..\..\bin\ALGLIB-3.5.0.dll</HintPath> 96 <Private>False</Private> 97 </Reference> 98 <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 99 <Private>False</Private> 100 </Reference> 101 <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 102 <Private>False</Private> 103 </Reference> 104 <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 105 <Private>False</Private> 106 </Reference> 107 <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 108 <Private>False</Private> 109 </Reference> 110 <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 111 <Private>False</Private> 112 </Reference> 113 <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 114 <Private>False</Private> 115 </Reference> 116 <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 117 <Private>False</Private> 118 </Reference> 119 <Reference Include="HeuristicLab.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 120 <Private>False</Private> 121 </Reference> 122 <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 123 <Private>False</Private> 124 </Reference> 125 <Reference Include="HeuristicLab.Optimization.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 126 <Private>False</Private> 127 </Reference> 128 <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 129 <Private>False</Private> 130 </Reference> 131 <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 132 <Private>False</Private> 133 </Reference> 134 <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 135 <Private>False</Private> 136 </Reference> 137 <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 138 <Private>False</Private> 97 139 </Reference> 98 140 <Reference Include="System" /> … … 228 270 </ItemGroup> 229 271 <ItemGroup> 230 <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">231 <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>232 <Name>HeuristicLab.Analysis-3.3</Name>233 <Private>False</Private>234 </ProjectReference>235 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">236 <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>237 <Name>HeuristicLab.Collections-3.3</Name>238 <Private>False</Private>239 </ProjectReference>240 <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">241 <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>242 <Name>HeuristicLab.Common.Resources-3.3</Name>243 <Private>False</Private>244 </ProjectReference>245 <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">246 <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>247 <Name>HeuristicLab.Common-3.3</Name>248 <Private>False</Private>249 </ProjectReference>250 <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">251 <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>252 <Name>HeuristicLab.Core-3.3</Name>253 <Private>False</Private>254 </ProjectReference>255 <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">256 <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>257 <Name>HeuristicLab.Data-3.3</Name>258 <Private>False</Private>259 </ProjectReference>260 <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">261 <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>262 <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>263 <Private>False</Private>264 </ProjectReference>265 <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">266 <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>267 <Name>HeuristicLab.Operators-3.3</Name>268 <Private>False</Private>269 </ProjectReference>270 <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">271 <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>272 <Name>HeuristicLab.Optimization.Operators-3.3</Name>273 <Private>False</Private>274 </ProjectReference>275 <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">276 <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>277 <Name>HeuristicLab.Optimization-3.3</Name>278 <Private>False</Private>279 </ProjectReference>280 <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">281 <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>282 <Name>HeuristicLab.Parameters-3.3</Name>283 <Private>False</Private>284 </ProjectReference>285 <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">286 <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>287 <Name>HeuristicLab.Persistence-3.3</Name>288 <Private>False</Private>289 </ProjectReference>290 <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">291 <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>292 <Name>HeuristicLab.PluginInfrastructure-3.3</Name>293 <Private>False</Private>294 </ProjectReference>295 272 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj"> 296 273 <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project> 297 274 <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name> 298 <Private>False</Private>299 </ProjectReference>300 <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">301 <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project>302 <Name>HeuristicLab.Random-3.3</Name>303 275 <Private>False</Private> 304 276 </ProjectReference> -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs
r7726 r7758 319 319 } 320 320 } 321 322 public abstract void ImportProblemDataFromFile(string fileName);323 321 } 324 322 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs
r7750 r7758 166 166 if (values == null) throw new ArgumentException("The variable " + variableName + " is not a double variable."); 167 167 168 //mkommend yield return used to enable lazy evaluation 169 foreach (double value in values) 170 yield return value; 168 return values; 171 169 } 172 170 public ReadOnlyCollection<double> GetReadOnlyDoubleValues(string variableName) { -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblem.cs
r7750 r7758 46 46 } 47 47 48 public override void ImportProblemDataFromFile(string fileName) {49 ClassificationProblemData problemData = ClassificationProblemData.ImportFromFile(fileName);50 ProblemData = problemData;51 }52 53 48 public void Load(ClassificationData data) { 54 49 Name = data.Name; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
r7603 r7758 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.IO;25 24 using System.Linq; 26 25 using HeuristicLab.Common; … … 29 28 using HeuristicLab.Parameters; 30 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 using HeuristicLab.Problems.Instances;32 30 33 31 namespace HeuristicLab.Problems.DataAnalysis { … … 404 402 } 405 403 #endregion 406 407 #region Import from file408 public static ClassificationProblemData ImportFromFile(string fileName) {409 TableFileParser csvFileParser = new TableFileParser();410 csvFileParser.Parse(fileName);411 412 Dataset dataset = new Dataset(csvFileParser.VariableNames, csvFileParser.Values);413 dataset.Name = Path.GetFileName(fileName);414 415 ClassificationProblemData problemData = new ClassificationProblemData(dataset, dataset.DoubleVariables.Skip(1), dataset.DoubleVariables.First());416 problemData.Name = "Data imported from " + Path.GetFileName(fileName);417 return problemData;418 }419 #endregion420 404 } 421 405 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblem.cs
r7259 r7758 38 38 ProblemData = new ClusteringProblemData(); 39 39 } 40 41 public override void ImportProblemDataFromFile(string fileName) {42 ClusteringProblemData problemData = ClusteringProblemData.ImportFromFile(fileName);43 ProblemData = problemData;44 }45 40 } 46 41 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblemData.cs
r7603 r7758 21 21 22 22 using System.Collections.Generic; 23 using System.IO;24 23 using HeuristicLab.Common; 25 24 using HeuristicLab.Core; 26 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.Problems.Instances;28 26 29 27 namespace HeuristicLab.Problems.DataAnalysis { … … 91 89 : base(dataset, allowedInputVariables) { 92 90 } 93 94 95 #region Import from file96 public static ClusteringProblemData ImportFromFile(string fileName) {97 TableFileParser csvFileParser = new TableFileParser();98 csvFileParser.Parse(fileName);99 100 Dataset dataset = new Dataset(csvFileParser.VariableNames, csvFileParser.Values);101 dataset.Name = Path.GetFileName(fileName);102 103 ClusteringProblemData problemData = new ClusteringProblemData(dataset, dataset.DoubleVariables);104 problemData.Name = "Data imported from " + Path.GetFileName(fileName);105 return problemData;106 }107 #endregion108 91 } 109 92 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblem.cs
r7259 r7758 90 90 if (handler != null) handler(this, EventArgs.Empty); 91 91 } 92 93 public abstract void ImportProblemDataFromFile(string fileName);94 92 } 95 93 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblem.cs
r7683 r7758 46 46 } 47 47 48 public override void ImportProblemDataFromFile(string fileName) {49 RegressionProblemData problemData = RegressionProblemData.ImportFromFile(fileName);50 ProblemData = problemData;51 }52 53 48 public void Load(RegressionData data) { 54 49 Name = data.Name; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
r7603 r7758 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.IO;25 24 using System.Linq; 26 25 using HeuristicLab.Common; … … 29 28 using HeuristicLab.Parameters; 30 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 using HeuristicLab.Problems.Instances;32 30 33 31 namespace HeuristicLab.Problems.DataAnalysis { … … 137 135 OnChanged(); 138 136 } 139 140 #region Import from file141 public static RegressionProblemData ImportFromFile(string fileName) {142 TableFileParser csvFileParser = new TableFileParser();143 csvFileParser.Parse(fileName);144 145 Dataset dataset = new Dataset(csvFileParser.VariableNames, csvFileParser.Values);146 dataset.Name = Path.GetFileName(fileName);147 148 RegressionProblemData problemData = new RegressionProblemData(dataset, dataset.DoubleVariables.Skip(1), dataset.DoubleVariables.First());149 problemData.Name = "Data imported from " + Path.GetFileName(fileName);150 return problemData;151 }152 #endregion153 137 } 154 138 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblem.cs
r7259 r7758 29 29 IDataAnalysisProblemData ProblemData { get; } 30 30 event EventHandler ProblemDataChanged; 31 32 void ImportProblemDataFromFile(string fileName);33 31 } 34 32 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Classification/3.4/RealWorld/RealWorldInstanceProvider.cs
r7685 r7758 43 43 } 44 44 45 protected override string File Extension{ get { return "RealWorld"; } }45 protected override string FileName { get { return "RealWorld"; } } 46 46 47 47 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { … … 49 49 descriptorList.Add(new Iris()); 50 50 descriptorList.Add(new Mammography()); 51 var solutionsArchiveName = GetResourceName(File Extension+ @"\.zip");51 var solutionsArchiveName = GetResourceName(FileName + @"\.zip"); 52 52 if (!String.IsNullOrEmpty(solutionsArchiveName)) { 53 53 using (var solutionsZipFile = new ZipInputStream(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName))) { -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Classification/3.4/ResourceClassificationInstanceProvider.cs
r7685 r7758 31 31 public abstract class ResourceClassificationInstanceProvider : ClassificationInstanceProvider { 32 32 33 protected abstract string File Extension{ get; }33 protected abstract string FileName { get; } 34 34 35 35 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { 36 var solutionsArchiveName = GetResourceName(File Extension+ @"\.zip");36 var solutionsArchiveName = GetResourceName(FileName + @"\.zip"); 37 37 if (!String.IsNullOrEmpty(solutionsArchiveName)) { 38 38 using (var solutionsZipFile = new ZipInputStream(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName))) { … … 66 66 67 67 private string GetTempFileForResource(string resourceName) { 68 var instanceArchiveName = GetResourceName(File Extension+ @"\.zip");68 var instanceArchiveName = GetResourceName(FileName + @"\.zip"); 69 69 using (var instancesZipFile = new ZipFile(GetType().Assembly.GetManifestResourceStream(instanceArchiveName))) { 70 70 var entry = instancesZipFile.GetEntry(resourceName); -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/RealWorld/RealWorldInstanceProvider.cs
r7667 r7758 39 39 } 40 40 41 protected override string File Extension{ get { return "RealWorld"; } }41 protected override string FileName { get { return "RealWorld"; } } 42 42 } 43 43 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/ResourceRegressionInstanceProvider.cs
r7667 r7758 31 31 public abstract class ResourceRegressionInstanceProvider : RegressionInstanceProvider { 32 32 33 protected abstract string File Extension{ get; }33 protected abstract string FileName { get; } 34 34 35 35 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { 36 var solutionsArchiveName = GetResourceName(File Extension+ @"\.zip");36 var solutionsArchiveName = GetResourceName(FileName + @"\.zip"); 37 37 if (!String.IsNullOrEmpty(solutionsArchiveName)) { 38 38 using (var solutionsZipFile = new ZipInputStream(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName))) { … … 66 66 67 67 private string GetTempFileForResource(string resourceName) { 68 var instanceArchiveName = GetResourceName(File Extension+ @"\.zip");68 var instanceArchiveName = GetResourceName(FileName + @"\.zip"); 69 69 using (var instancesZipFile = new ZipFile(GetType().Assembly.GetManifestResourceStream(instanceArchiveName))) { 70 70 var entry = instancesZipFile.GetEntry(resourceName); -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/TrentMcConaghy/TrentMcConaghyInstanceProvider.cs
r7682 r7758 43 43 } 44 44 45 protected override string File Extension{ get { return "TrentMcConaghy"; } }45 protected override string FileName { get { return "TrentMcConaghy"; } } 46 46 47 47 public override RegressionData LoadData(IDataDescriptor id) { -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.TSPLIB.Views/3.3/TSPLIBTSPInstanceProviderView.cs
r7754 r7758 25 25 using HeuristicLab.MainForm.WindowsForms; 26 26 using HeuristicLab.Problems.Instances.Views; 27 using System.IO; 27 28 28 29 namespace HeuristicLab.Problems.Instances.TSPLIB.Views { … … 43 44 if (dialog.ShowDialog() == DialogResult.OK) { 44 45 var instance = Content.LoadData(dialog.TSPFileName, dialog.TourFileName, dialog.Quality); 45 Content.Consumer.Load(instance); 46 try { 47 GenericConsumer.Load(instance); 48 } 49 catch (Exception ex) { 50 MessageBox.Show(String.Format("This problem does not support loading the instance {0}: {1}", Path.GetFileName(openFileDialog.FileName), Environment.NewLine + ex.Message), "Cannot load instance"); 51 } 46 52 } 47 53 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceProviderViewGeneric.Designer.cs
r7684 r7758 83 83 // instancesComboBox 84 84 // 85 this.instancesComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 85 this.instancesComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 86 86 | System.Windows.Forms.AnchorStyles.Right))); 87 87 this.instancesComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; … … 128 128 // problemInstanceProviderSplitContainer 129 129 // 130 this.problemInstanceProviderSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 131 | System.Windows.Forms.AnchorStyles.Left) 130 this.problemInstanceProviderSplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 131 | System.Windows.Forms.AnchorStyles.Left) 132 132 | System.Windows.Forms.AnchorStyles.Right))); 133 133 this.problemInstanceProviderSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; … … 168 168 #endregion 169 169 170 pr ivateSystem.Windows.Forms.OpenFileDialog openFileDialog;171 pr ivateSystem.Windows.Forms.ToolTip toolTip;170 protected System.Windows.Forms.OpenFileDialog openFileDialog; 171 protected System.Windows.Forms.ToolTip toolTip; 172 172 protected System.Windows.Forms.Button loadButton; 173 173 protected System.Windows.Forms.Label instanceLabel; … … 175 175 protected System.Windows.Forms.Button importButton; 176 176 protected System.Windows.Forms.Button exportButton; 177 pr ivateSystem.Windows.Forms.SaveFileDialog saveFileDialog;178 pr ivateSystem.Windows.Forms.SplitContainer problemInstanceProviderSplitContainer;177 protected System.Windows.Forms.SaveFileDialog saveFileDialog; 178 protected System.Windows.Forms.SplitContainer problemInstanceProviderSplitContainer; 179 179 180 180 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/ProblemInstanceProviderViewGeneric.cs
r7698 r7758 39 39 } 40 40 41 pr ivateIProblemInstanceConsumer<T> GenericConsumer { get { return Consumer as IProblemInstanceConsumer<T>; } }42 p ublicIProblemInstanceConsumer consumer;41 protected IProblemInstanceConsumer<T> GenericConsumer { get { return Consumer as IProblemInstanceConsumer<T>; } } 42 protected IProblemInstanceConsumer consumer; 43 43 public override IProblemInstanceConsumer Consumer { 44 44 get { return consumer; } … … 49 49 } 50 50 51 pr ivateIProblemInstanceExporter<T> GenericExporter { get { return Exporter as IProblemInstanceExporter<T>; } }52 pr ivateIProblemInstanceExporter exporter;51 protected IProblemInstanceExporter<T> GenericExporter { get { return Exporter as IProblemInstanceExporter<T>; } } 52 protected IProblemInstanceExporter exporter; 53 53 public override IProblemInstanceExporter Exporter { 54 54 get { return exporter; } … … 63 63 importButton.Text = String.Empty; 64 64 importButton.Image = VSImageLibrary.Open; 65 toolTip.SetToolTip(importButton, "Import a " + GetProblemType() + " instancefrom file.");65 toolTip.SetToolTip(importButton, "Import a " + GetProblemType() + " problem from file."); 66 66 exportButton.Text = String.Empty; 67 67 exportButton.Image = VSImageLibrary.Save; 68 toolTip.SetToolTip(exportButton, "Export a " + GetProblemType() + " instanceto a file.");68 toolTip.SetToolTip(exportButton, "Export currently loaded " + GetProblemType() + " problem to a file."); 69 69 loadButton.Text = String.Empty; 70 70 loadButton.Image = VSImageLibrary.RefreshDocument; 71 toolTip.SetToolTip(loadButton, "Load the selected instance.");71 toolTip.SetToolTip(loadButton, "Load the selected problem."); 72 72 } 73 73 -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances/3.3/IProblemInstanceProvider.cs
r7548 r7758 33 33 34 34 public interface IProblemInstanceProvider<TData> : IProblemInstanceProvider { 35 IProblemInstanceConsumer<TData> Consumer { get; set; }36 37 35 IEnumerable<IDataDescriptor> GetDataDescriptors(); 38 36 TData LoadData(IDataDescriptor descriptor); 39 37 TData LoadData(string path); 40 38 41 39 void SaveData(TData instance, string path); 42 40 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances/3.3/ProblemInstanceProvider.cs
r7548 r7758 25 25 namespace HeuristicLab.Problems.Instances { 26 26 public abstract class ProblemInstanceProvider<TData> : IProblemInstanceProvider<TData> { 27 public virtual IProblemInstanceConsumer<TData> Consumer { get; set; }28 29 27 public abstract string Name { get; } 30 28 public abstract string Description { get; }
Note: See TracChangeset
for help on using the changeset viewer.