Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7667


Ignore:
Timestamp:
03/27/12 16:58:22 (13 years ago)
Author:
sforsten
Message:

#1784:

  • updated the Plugin.cs.frame files
  • added other real world problem instances
  • put some methods from TrentMcConaghyInstanceProvider to the super class ResourceRegressionInstanceProvider
Location:
branches/ProblemInstancesRegressionAndClassification
Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Optimization.Views/3.3/Plugin.cs.frame

    r7558 r7667  
    3939  [PluginDependency("HeuristicLab.Optimization", "3.3")]
    4040  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
     41  [PluginDependency("HeuristicLab.Problems.Instances.Views", "3.4")]
    4142  [PluginDependency("HeuristicLab.Visualization.ChartControlsExtensions","3.3")]
    4243  public class HeuristicLabOptimizationViewsPlugin : PluginBase {
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/HeuristicLab.Problems.Instances.Regression-3.4.csproj

    r7666 r7667  
    101101    <Compile Include="Nguyen\NguyenInstanceProvider.cs" />
    102102    <Compile Include="Plugin.cs" />
     103    <Compile Include="RealWorld\RealWorldInstanceProvider.cs" />
    103104    <Compile Include="ResourceRegressionInstanceProvider.cs" />
    104105    <Compile Include="ArtificialRegressionInstanceProvider.cs" />
     
    126127  <ItemGroup>
    127128    <EmbeddedResource Include="Data\TrentMcConaghy.zip" />
     129    <EmbeddedResource Include="Data\RealWorld.zip" />
    128130    <None Include="HeuristicLab.snk" />
    129131    <None Include="Plugin.cs.frame" />
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Plugin.cs.frame

    r7603 r7667  
    2626  [PluginFile("HeuristicLab.Problems.Instances.Regression-3.4.dll", PluginFileType.Assembly)]
    2727  [PluginDependency("HeuristicLab.Common", "3.3")]
     28  [PluginDependency("HeuristicLab.Core", "3.3")]
     29  [PluginDependency("HeuristicLab.Optimization", "3.3")]
    2830  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
    2931  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/Properties/AssemblyInfo.cs

    r7666 r7667  
    5555// [assembly: AssemblyVersion("1.0.*")]
    5656[assembly: AssemblyVersion("3.4.0.0")]
    57 [assembly: AssemblyFileVersion("3.4.0.7665")]
     57[assembly: AssemblyFileVersion("3.4.0.7666")]
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/ResourceRegressionInstanceProvider.cs

    r7666 r7667  
    2020#endregion
    2121
     22using System;
     23using System.Collections.Generic;
    2224using System.IO;
    2325using System.Linq;
     
    3032
    3133    protected abstract string FileExtension { get; }
     34
     35    public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
     36      var solutionsArchiveName = GetResourceName(FileExtension + @"\.zip");
     37      if (!String.IsNullOrEmpty(solutionsArchiveName)) {
     38        using (var solutionsZipFile = new ZipInputStream(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName))) {
     39          foreach (var entry in GetZipContents(solutionsZipFile).OrderBy(x => x))
     40            yield return new ResourceRegressionDataDescriptor(Path.GetFileNameWithoutExtension(entry), Description, entry);
     41        }
     42      }
     43    }
    3244
    3345    public override RegressionData LoadData(IDataDescriptor id) {
     
    4456      return Assembly.GetExecutingAssembly().GetManifestResourceNames()
    4557              .Where(x => Regex.Match(x, @".*\.Data\." + fileName).Success).SingleOrDefault();
     58    }
     59
     60    protected IEnumerable<string> GetZipContents(ZipInputStream zipFile) {
     61      ZipEntry entry;
     62      while ((entry = zipFile.GetNextEntry()) != null) {
     63        yield return entry.Name;
     64      }
    4665    }
    4766
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Regression/3.4/TrentMcConaghy/TrentMcConaghyInstanceProvider.cs

    r7666 r7667  
    2121
    2222using System;
    23 using System.Collections.Generic;
    24 using System.IO;
    2523using System.Linq;
    26 using ICSharpCode.SharpZipLib.Zip;
    2724
    2825namespace HeuristicLab.Problems.Instances.Regression {
     
    4845    protected override string FileExtension { get { return "TrentMcConaghy"; } }
    4946
    50     public override IEnumerable<IDataDescriptor> GetDataDescriptors() {
    51       var solutionsArchiveName = GetResourceName(FileExtension + @"\.zip");
    52       if (!String.IsNullOrEmpty(solutionsArchiveName)) {
    53         using (var solutionsZipFile = new ZipInputStream(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName))) {
    54           foreach (var entry in GetZipContents(solutionsZipFile).OrderBy(x => x))
    55             yield return new ResourceRegressionDataDescriptor(Path.GetFileNameWithoutExtension(entry), Description, entry);
    56         }
    57       }
    58     }
    59 
    6047    public override RegressionData LoadData(IDataDescriptor id) {
    6148      RegressionData regData = base.LoadData(id);
     
    6653      return regData;
    6754    }
    68 
    69     protected IEnumerable<string> GetZipContents(ZipInputStream zipFile) {
    70       ZipEntry entry;
    71       while ((entry = zipFile.GetNextEntry()) != null) {
    72         yield return entry.Name;
    73       }
    74     }
    7555  }
    7656}
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/Plugin.cs

    r7666 r7667  
    2323
    2424namespace HeuristicLab.Problems.Instances.Views {
    25   [Plugin("HeuristicLab.Problems.Instances.Views", "3.4.0.7665")]
     25  [Plugin("HeuristicLab.Problems.Instances.Views", "3.4.0.7666")]
    2626  [PluginFile("HeuristicLab.Problems.Instances.Views-3.4.dll", PluginFileType.Assembly)]
    2727  [PluginDependency("HeuristicLab.Common", "3.3")]
  • branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Views/3.4/Properties/AssemblyInfo.cs

    r7666 r7667  
    5353// by using the '*' as shown below:
    5454[assembly: AssemblyVersion("3.4.0.0")]
    55 [assembly: AssemblyFileVersion("3.4.2.7665")]
     55[assembly: AssemblyFileVersion("3.4.2.7666")]
Note: See TracChangeset for help on using the changeset viewer.