4using System.Collections.Generic;
7using System.Threading.Tasks;
16 Dictionary<int, DataSet> m_rgDatasets =
new Dictionary<int, DataSet>();
17 Dictionary<string, int> m_rgDatasetIDs =
new Dictionary<string, int>();
18 Dictionary<int, int> m_rgSourceIDtoDatasetID =
new Dictionary<int, int>();
43 foreach (KeyValuePair<int, DataSet> kv
in m_rgDatasets)
50 if (m_rgDatasets.ContainsKey(nDsID))
52 m_rgDatasets[nDsID].CleanUp();
53 m_rgDatasets.Remove(nDsID);
105 if (!m_rgDatasets.ContainsKey(nDatasetID))
108 return m_rgDatasets[nDatasetID];
132 foreach (KeyValuePair<int, DataSet> kvp
in m_rgDatasets)
135 if (src.
ID == nSrcID)
138 src = kvp.Value.Dataset.TestingSource;
139 if (src.
ID == nSrcID)
153 foreach (KeyValuePair<int, DataSet> kvp
in m_rgDatasets)
156 if (src.
Name == strSrc)
159 src = kvp.Value.Dataset.TestingSource;
160 if (src.
Name == strSrc)
174 if (!m_rgSourceIDtoDatasetID.ContainsKey(nSrcID))
177 int nDsID = m_rgSourceIDtoDatasetID[nSrcID];
193 if (!m_rgDatasetIDs.ContainsKey(strDs))
196 return m_rgDatasetIDs[strDs];
The Log class provides general output in text form.
int ID
Get/set the database ID of the item.
string Name
Get/set the name of the item.
The DatasetDescriptor class describes a dataset which contains both a training data source and testin...
SourceDescriptor TrainingSource
Get/set the training data source.
SourceDescriptor TestingSource
Get/set the testing data source.
The SourceDescriptor class contains all information describing a data source.
The DataSet class loads the training and testing data.
DatasetDescriptor Dataset
Return the dataset descriptor.
TemporalSet GetTemporalSetBySourceID(int nSourceID)
Returns the temporal set for the specified source ID.
The DatasetCollection manages a set of datasets.
void Dispose()
Release all resources used.
TemporalSet FindTemporalSetBySourceID(int nSrcID)
Find the temporal set associated with the source ID.
SourceDescriptor FindSourceByID(int nSrcID)
Find the source descriptor associated with the source ID.
void CleanUp(int nDsID)
Release all resources used by the dataset with the specified ID.
DataSet Find(string strDs)
Find and return the dataset associated with the dataset name.
DataSet Find(int nDatasetID)
Find and return the dataset associated with the dataset ID.
DataSet Add(DatasetDescriptor dsd, Log log)
Add a new dataset to the collection if it does not already exist.
SourceDescriptor FindSourceByName(string strSrc)
Find the source descriptor associated with the source Name.
void Add(DataSet ds)
Add a new dataset to the collection.
int GetDatasetID(string strDs)
Returns the dataset ID associated with the dataset name.
DatasetCollection()
The constructor.
The TemporalSet manages a set of temporal data for a given data source.
The descriptors namespace contains all descriptor used to describe various items stored within the da...
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
The MyCaffe.db.temporal namespace contains all classes used to create the MyCaffeTemporalDatabase in-...
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...