MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.db.image.MasterIndexes Class Reference

The MasterIndexes stores the indexes that define the index structure of the data source data. More...

Inheritance diagram for MyCaffe.db.image.MasterIndexes:
MyCaffe.db.image.QueryState

Public Member Functions

 MasterIndexes (CryptoRandom random, SourceDescriptor src, int nLoadLimit=0)
 The constructor. More...
 
 MasterIndexes (MasterIndexes idx, IMGDB_SORT sort)
 The constructor used to copy another MasterIndexes and optionally specify a sorting for the indexes. More...
 
void Dispose ()
 Release all resources used. More...
 
List< DbItemFindImageIndexes (DateTime dt)
 Returns all DbItems that point to images iwth a given date. More...
 
void Reload (List< DbItem > rgItems)
 Reload all images by re-loading the master index list. More...
 
Index GetIndex (int? nLabel=null, bool bBoosted=false)
 Returns the Index matching the criteria. More...
 
void SetIndex (Index idx, int? nLabel=null, bool bBoosted=false)
 Set a given index based on the criteria. More...
 
List< int > GetIndexes (int nStartIdx, int nQueryCount=int.MaxValue, string strFilterVal=null, int? nBoostVal=null, bool bBoostValIsExact=false)
 Returns the indexes fitting the criteria. More...
 
List< int > GetIndexes (DateTime dtStart, int nQueryCount=int.MaxValue, string strFilterVal=null, int? nBoostVal=null, bool bBoostValIsExact=false)
 Returns the indexes fitting the criteria. More...
 
virtual ? int GetNextLabel (Index.SELECTION_TYPE type, bool bBoosted=false)
 Returns the next label in the Index set selected based on the selection criteria. More...
 
virtual ? int GetNextImage (Index.SELECTION_TYPE type, int? nLabel=null, bool bBoosted=false, int nDirectIdx=-1)
 Returns the next image in the Index set based on the selection criteria. More...
 
override string ToString ()
 Returns a string representation of the master indexes. More...
 

Protected Attributes

SourceDescriptor m_src
 Specifies the data source descriptor. More...
 
Index m_index = null
 Specifies the index into all of the data source images. More...
 
LabelIndex m_rgLabels = null
 Specifies the list of images listed by label where each label contains an index into all images with that label. More...
 
Index m_boosted = null
 Specifies the list of all boosted images. More...
 
LabelIndex m_rgLabelsBoosted = null
 Specifies the list of all boosted images listed by label where each label contains an index into all boosted images with that label. More...
 

Properties

List< DbItemRawIndexes [get]
 Returns the raw indexes. More...
 
int LoadLimit [get]
 Returns the load limit set during initialization. More...
 
int LabelCount [get]
 Returns the number of labels. More...
 

Detailed Description

The MasterIndexes stores the indexes that define the index structure of the data source data.

Definition at line 14 of file MasterIndexes.cs.

Constructor & Destructor Documentation

◆ MasterIndexes() [1/2]

MyCaffe.db.image.MasterIndexes.MasterIndexes ( CryptoRandom  random,
SourceDescriptor  src,
int  nLoadLimit = 0 
)

The constructor.

Parameters
randomSpecifies the random number generator.
srcSpecifies the data source.
nLoadLimitOptionally, specifies the load limit used which when set to a value > 0, limits queries to RANDOM image selection within the load limit count (default = 0).

Definition at line 50 of file MasterIndexes.cs.

◆ MasterIndexes() [2/2]

MyCaffe.db.image.MasterIndexes.MasterIndexes ( MasterIndexes  idx,
IMGDB_SORT  sort 
)

The constructor used to copy another MasterIndexes and optionally specify a sorting for the indexes.

Parameters
idxSpecifies the MasterIndexes to copy.
sortOptionally, specifies a sorting to use on the indexes.

Definition at line 81 of file MasterIndexes.cs.

Member Function Documentation

◆ Dispose()

void MyCaffe.db.image.MasterIndexes.Dispose ( )

Release all resources used.

Definition at line 99 of file MasterIndexes.cs.

◆ FindImageIndexes()

List< DbItem > MyCaffe.db.image.MasterIndexes.FindImageIndexes ( DateTime  dt)

Returns all DbItems that point to images iwth a given date.

Parameters
dtSpecifies the date to look for.
Returns
The list of DbItems matching the images is returned.

Definition at line 138 of file MasterIndexes.cs.

◆ GetIndex()

Index MyCaffe.db.image.MasterIndexes.GetIndex ( int?  nLabel = null,
bool  bBoosted = false 
)

Returns the Index matching the criteria.

Parameters
nLabelOptionally, specifies a label to use (default = null).
bBoostedOptionally, specifies to use boosted images (default = false).
Returns
The Index matching the criteria is returned.

Definition at line 158 of file MasterIndexes.cs.

◆ GetIndexes() [1/2]

List< int > MyCaffe.db.image.MasterIndexes.GetIndexes ( DateTime  dtStart,
int  nQueryCount = int.MaxValue,
string  strFilterVal = null,
int?  nBoostVal = null,
bool  bBoostValIsExact = false 
)

Returns the indexes fitting the criteria.

Parameters
dtStartSpecifies a starting time from which the query is to start within the set of images.
nQueryCountOptionally, specifies a number of images to retrieve within the set (default = int.MaxValue).
strFilterValOptionally, specifies the filter value that the description must match (default = null, which ignores this parameter).
nBoostValOptionally, specifies the boost value that the boost must match (default = null, which ignores this parameter).
bBoostValIsExactOptionally, specifies whether or the boost value (if specified) is to be used literally (exact = true), or as a minimum boost value.
Returns
A list with the image indexes is returned.

Definition at line 228 of file MasterIndexes.cs.

◆ GetIndexes() [2/2]

List< int > MyCaffe.db.image.MasterIndexes.GetIndexes ( int  nStartIdx,
int  nQueryCount = int.MaxValue,
string  strFilterVal = null,
int?  nBoostVal = null,
bool  bBoostValIsExact = false 
)

Returns the indexes fitting the criteria.

Parameters
nStartIdxSpecifies a starting index from which the query is to start within the set of images.
nQueryCountOptionally, specifies a number of images to retrieve within the set (default = int.MaxValue).
strFilterValOptionally, specifies the filter value that the description must match (default = null, which ignores this parameter).
nBoostValOptionally, specifies the boost value that the boost must match (default = null, which ignores this parameter).
bBoostValIsExactOptionally, specifies whether or the boost value (if specified) is to be used literally (exact = true), or as a minimum boost value.
Returns
A list with the image indexes is returned.

Definition at line 209 of file MasterIndexes.cs.

◆ GetNextImage()

virtual ? int MyCaffe.db.image.MasterIndexes.GetNextImage ( Index.SELECTION_TYPE  type,
int?  nLabel = null,
bool  bBoosted = false,
int  nDirectIdx = -1 
)
virtual

Returns the next image in the Index set based on the selection criteria.

Parameters
typeSpecifies the selection type (e.g. RANDOM, SEQUENTIAL).
nLabelOptionally, specifies a label (default = null).
bBoostedOptionally, specifies to query boosted images (default = false).
nDirectIdxOptionally, specifies to query the image at this index (only applies when type = DIRECT).
Returns
The next image index is returned.

Reimplemented in MyCaffe.db.image.QueryState.

Definition at line 261 of file MasterIndexes.cs.

◆ GetNextLabel()

virtual ? int MyCaffe.db.image.MasterIndexes.GetNextLabel ( Index.SELECTION_TYPE  type,
bool  bBoosted = false 
)
virtual

Returns the next label in the Index set selected based on the selection criteria.

Parameters
typeSpecifies the selection type (e.g. RANDOM, SEQUENTIAL).
bBoostedOptionally, specifies to use label sets of boosted images (default = false).
Returns
The next label index is returned.

Reimplemented in MyCaffe.db.image.QueryState.

Definition at line 244 of file MasterIndexes.cs.

◆ Reload()

void MyCaffe.db.image.MasterIndexes.Reload ( List< DbItem rgItems)

Reload all images by re-loading the master index list.

Parameters
rgItemsSpecifies the list of DbItem's used to re-load the indexes.

Definition at line 147 of file MasterIndexes.cs.

◆ SetIndex()

void MyCaffe.db.image.MasterIndexes.SetIndex ( Index  idx,
int?  nLabel = null,
bool  bBoosted = false 
)

Set a given index based on the criteria.

Parameters
idxSpecifies the Index source.
nLabelOptionally, specifies a label to use (default = null).
bBoostedOptionally, specifies to use boosted images (default = false).

Definition at line 182 of file MasterIndexes.cs.

◆ ToString()

override string MyCaffe.db.image.MasterIndexes.ToString ( )

Returns a string representation of the master indexes.

Returns
The string representation is returned.

Definition at line 290 of file MasterIndexes.cs.

Member Data Documentation

◆ m_boosted

Index MyCaffe.db.image.MasterIndexes.m_boosted = null
protected

Specifies the list of all boosted images.

Definition at line 31 of file MasterIndexes.cs.

◆ m_index

Index MyCaffe.db.image.MasterIndexes.m_index = null
protected

Specifies the index into all of the data source images.

Definition at line 23 of file MasterIndexes.cs.

◆ m_rgLabels

LabelIndex MyCaffe.db.image.MasterIndexes.m_rgLabels = null
protected

Specifies the list of images listed by label where each label contains an index into all images with that label.

Definition at line 27 of file MasterIndexes.cs.

◆ m_rgLabelsBoosted

LabelIndex MyCaffe.db.image.MasterIndexes.m_rgLabelsBoosted = null
protected

Specifies the list of all boosted images listed by label where each label contains an index into all boosted images with that label.

Definition at line 35 of file MasterIndexes.cs.

◆ m_src

SourceDescriptor MyCaffe.db.image.MasterIndexes.m_src
protected

Specifies the data source descriptor.

Definition at line 19 of file MasterIndexes.cs.

Property Documentation

◆ LabelCount

int MyCaffe.db.image.MasterIndexes.LabelCount
get

Returns the number of labels.

Definition at line 128 of file MasterIndexes.cs.

◆ LoadLimit

int MyCaffe.db.image.MasterIndexes.LoadLimit
get

Returns the load limit set during initialization.

Definition at line 120 of file MasterIndexes.cs.

◆ RawIndexes

List<DbItem> MyCaffe.db.image.MasterIndexes.RawIndexes
get

Returns the raw indexes.

Definition at line 112 of file MasterIndexes.cs.


The documentation for this class was generated from the following file: