Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2304


Ignore:
Timestamp:
08/21/09 12:32:42 (15 years ago)
Author:
mkommend
Message:

added problem methods to modeling database (ticket #712)

Location:
trunk/sources
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DataObjects/Problem.cs

    r2229 r2304  
    5656    public Dataset Dataset {
    5757      get { return (Dataset)PersistenceManager.RestoreFromGZip(this.Data); }
    58       set { this.Data = PersistenceManager.SaveToGZip(value); }
     58      private set { this.Data = PersistenceManager.SaveToGZip(value); }
    5959    }
    6060  }
  • trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs

    r2303 r2304  
    145145    }
    146146
    147     public Problem GetOrCreateProblem(Dataset dataset) {
    148       Problem problem;
     147    public IProblem GetOrCreateProblem(Dataset dataset) {
     148      IProblem problem;
    149149      if (ctx.Problems.Count() == 0)
    150         problem = PersistProblem(dataset);
     150        problem =  PersistProblem(dataset);
    151151      else
    152152        problem = ctx.Problems.Single();
     
    156156    }
    157157
    158     private Problem PersistProblem(Dataset dataset) {
     158    public IProblem PersistProblem(Dataset dataset) {
    159159      Problem problem;
    160160      using (ModelingDataContext ctx = new ModelingDataContext(connection)) {
     
    272272    }
    273273    #endregion
    274 
    275     #region Problem
    276     public IProblem GetProblem() {
    277       if (ctx.Problems.Count() == 0)
    278         return null;
    279       return ctx.Problems.Single();
    280     }
    281     #endregion
    282274  }
    283275}
  • trunk/sources/HeuristicLab.Modeling.Database/3.2/HeuristicLab.Modeling.Database-3.2.csproj

    r2285 r2304  
    101101      <Name>HeuristicLab.Core-3.2</Name>
    102102    </ProjectReference>
     103    <ProjectReference Include="..\..\HeuristicLab.DataAnalysis\3.2\HeuristicLab.DataAnalysis-3.2.csproj">
     104      <Project>{7DD3A97A-56E9-462F-90E2-A351FE7AF5C2}</Project>
     105      <Name>HeuristicLab.DataAnalysis-3.2</Name>
     106    </ProjectReference>
    103107    <ProjectReference Include="..\..\HeuristicLab.Modeling\3.2\HeuristicLab.Modeling-3.2.csproj">
    104108      <Project>{80F7FADA-549D-4151-8856-79B620A50DBA}</Project>
  • trunk/sources/HeuristicLab.Modeling.Database/3.2/IModelingDatabase.cs

    r2301 r2304  
    2424using System.Linq;
    2525using System.Text;
     26using HeuristicLab.DataAnalysis;
    2627
    2728namespace HeuristicLab.Modeling.Database {
     
    2930    void Persist(HeuristicLab.Modeling.IAnalyzerModel model, string algorithmName, string algorithmDescription);
    3031    void Persist(HeuristicLab.Modeling.IAlgorithm algorithm);
     32    IProblem PersistProblem(Dataset dataset);
     33
    3134    IEnumerable<IModel> GetAllModels();
    3235    IEnumerable<IResult> GetAllResults();
    3336    IEnumerable<IResult> GetAllResultsForInputVariables();
    3437    IEnumerable<IAlgorithm> GetAllAlgorithms();
    35     IEnumerable<IModelResult> GetModelResults(IModel model);
     38       
     39    Dataset GetDataset();
    3640    byte[] GetModelData(IModel model);
    3741    IPredictor GetModelPredictor(IModel model);
     42    IEnumerable<IModelResult> GetModelResults(IModel model);
    3843    IEnumerable<IInputVariableResult> GetInputVariableResults(IModel model);
    39     IProblem GetProblem();
    4044
    4145    void Connect();
  • trunk/sources/HeuristicLab.Modeling.Database/3.2/IProblem.cs

    r2223 r2304  
    2424using System.Linq;
    2525using System.Text;
     26using HeuristicLab.DataAnalysis;
    2627
    2728namespace HeuristicLab.Modeling.Database {
    2829  public interface IProblem {
    2930    byte[] Data { get; }
     31    Dataset Dataset { get; }
    3032  }
    3133}
Note: See TracChangeset for help on using the changeset viewer.