MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.basecode.LabelMappingCollection Class Reference

The LabelMappingCollection manages a collection of LabelMapping's. More...

Inheritance diagram for MyCaffe.basecode.LabelMappingCollection:

Public Member Functions

 LabelMappingCollection ()
 The LabelMappingCollection constructor. More...
 
void Add (LabelMapping map)
 Adds a new label mapping. More...
 
bool Remove (LabelMapping map)
 Removes a label mapping. More...
 
LabelMappingCollection Clone ()
 Returns a copy of the label mapping collection. More...
 
int MapLabel (int nLabel, int nBoost)
 Returns the mapped label associated with a given label and boost (if a boost condition is used). More...
 
int MapLabelWithoutBoost (int nLabel)
 Returns the mapped label associated with a given label. More...
 
IEnumerator< LabelMappingGetEnumerator ()
 Returns the enumerator of the collection. More...
 
void Sort ()
 Sorts the label mappings. More...
 
bool Compare (LabelMappingCollection col)
 Compares one label mapping collection to another. More...
 
override string ToString ()
 Returns a string representation of the label mapping collection. More...
 
List< string > ToStringList ()
 Returns a list of strings where each entry represents a mapping. More...
 

Static Public Member Functions

static LabelMappingCollection Parse (string strMappings)
 Parses a label mapping string into a collection of label mappings. More...
 
static LabelMappingCollection Parse (List< string > rgstrMappings)
 Parses a list of strings where each string is a label mapping. More...
 

Properties

int Count [get]
 Returns the number of items in the collection. More...
 
List< LabelMappingMappings [getset]
 Returns the label mapping list. More...
 
LabelMapping this[int nIdx] [getset]
 Get/set an item at a given index. More...
 

Detailed Description

The LabelMappingCollection manages a collection of LabelMapping's.

Definition at line 14 of file LabelMapping.cs.

Constructor & Destructor Documentation

◆ LabelMappingCollection()

MyCaffe.basecode.LabelMappingCollection.LabelMappingCollection ( )

The LabelMappingCollection constructor.

Definition at line 21 of file LabelMapping.cs.

Member Function Documentation

◆ Add()

void MyCaffe.basecode.LabelMappingCollection.Add ( LabelMapping  map)

Adds a new label mapping.

Parameters
mapSpecifies the label mapping.

Definition at line 57 of file LabelMapping.cs.

◆ Clone()

LabelMappingCollection MyCaffe.basecode.LabelMappingCollection.Clone ( )

Returns a copy of the label mapping collection.

Returns

Definition at line 83 of file LabelMapping.cs.

◆ Compare()

bool MyCaffe.basecode.LabelMappingCollection.Compare ( LabelMappingCollection  col)

Compares one label mapping collection to another.

Parameters
colSpecifies the other collection to compare.
Returns
If the two collections are the same, true is returned, otherwise false is returned.

Definition at line 195 of file LabelMapping.cs.

◆ GetEnumerator()

IEnumerator< LabelMapping > MyCaffe.basecode.LabelMappingCollection.GetEnumerator ( )

Returns the enumerator of the collection.

Returns
The collection enumerator is returned.

Definition at line 151 of file LabelMapping.cs.

◆ MapLabel()

int MyCaffe.basecode.LabelMappingCollection.MapLabel ( int  nLabel,
int  nBoost 
)

Returns the mapped label associated with a given label and boost (if a boost condition is used).

Parameters
nLabelSpecifies the label to map.
nBoostSpecifies the boost condition that must be met if specified.

If a label mapping is found for the 'nLabel' parameter, the following logic follows: If no boost condition exists, the new 'mapped' label is returned, Otherwise, if the boost condition is met, the new 'mapped' label is returned, Otherwise, if the NewLabelConditionFalse exists, the NewLabelConditionFalse is returned, Otherwise the label is returned.

Returns
The mapped label is returned.

Definition at line 108 of file LabelMapping.cs.

◆ MapLabelWithoutBoost()

int MyCaffe.basecode.LabelMappingCollection.MapLabelWithoutBoost ( int  nLabel)

Returns the mapped label associated with a given label.

Parameters
nLabelSpecifies the label to map.
Returns
The mapped label is returned.

Definition at line 136 of file LabelMapping.cs.

◆ Parse() [1/2]

static LabelMappingCollection MyCaffe.basecode.LabelMappingCollection.Parse ( List< string >  rgstrMappings)
static

Parses a list of strings where each string is a label mapping.

Parameters
rgstrMappingsSpecifies the list of label mapping strings.
Returns
The new LabelMappingCollection is returned.

Definition at line 259 of file LabelMapping.cs.

◆ Parse() [2/2]

static LabelMappingCollection MyCaffe.basecode.LabelMappingCollection.Parse ( string  strMappings)
static

Parses a label mapping string into a collection of label mappings.

Parameters
strMappingsSpecifies the list of ';' separated label mappings.
Returns
The new LabelMappingCollection is returned.

Definition at line 248 of file LabelMapping.cs.

◆ Remove()

bool MyCaffe.basecode.LabelMappingCollection.Remove ( LabelMapping  map)

Removes a label mapping.

Parameters
mapSpecifies the label mapping.
Returns
If found and removed, returns true, otherwise returns false.

Definition at line 74 of file LabelMapping.cs.

◆ Sort()

void MyCaffe.basecode.LabelMappingCollection.Sort ( )

Sorts the label mappings.

Definition at line 168 of file LabelMapping.cs.

◆ ToString()

override string MyCaffe.basecode.LabelMappingCollection.ToString ( )

Returns a string representation of the label mapping collection.

Returns

Definition at line 213 of file LabelMapping.cs.

◆ ToStringList()

List< string > MyCaffe.basecode.LabelMappingCollection.ToStringList ( )

Returns a list of strings where each entry represents a mapping.

Returns
Returns the label mappings as a list of strings.

Definition at line 231 of file LabelMapping.cs.

Property Documentation

◆ Count

int MyCaffe.basecode.LabelMappingCollection.Count
get

Returns the number of items in the collection.

Definition at line 28 of file LabelMapping.cs.

◆ Mappings

List<LabelMapping> MyCaffe.basecode.LabelMappingCollection.Mappings
getset

Returns the label mapping list.

Definition at line 36 of file LabelMapping.cs.

◆ this[int nIdx]

LabelMapping MyCaffe.basecode.LabelMappingCollection.this[int nIdx]
getset

Get/set an item at a given index.

Parameters
nIdxSpecifies the index.
Returns
The item at the index is returned.

Definition at line 47 of file LabelMapping.cs.


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