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

The Bucket class contains the information describing a single range of values within a BucketCollection. More...

Public Member Functions

 Bucket (double fMin, double fMax)
 The constructor. More...
 
int Contains (double fVal)
 Tests to see if the Bucket range contains the value. More...
 
int Add (double fVal, bool bForce=false)
 Attempts to add a new value to the Bucket. More...
 
override string ToString ()
 Returns a string representation of the Bucket. More...
 
void Save (BinaryWriter bw)
 Save the Bucket to a BinaryWriter. More...
 

Static Public Member Functions

static Bucket Load (BinaryReader br)
 Load a Bucket from a BinaryReader. More...
 

Properties

int Count [get]
 Returns the number of items added to the Bucket. More...
 
double Average [get]
 Returns the average value of all values added to the Bucket. More...
 
double Minimum [get]
 Returns the bucket minimum value. More...
 
double Maximum [get]
 Returns the bucket maximum value. More...
 
double MidPoint [get]
 Returns the bucket midpoint. More...
 
object Tag [getset]
 Get/set a user specified tag. More...
 

Detailed Description

The Bucket class contains the information describing a single range of values within a BucketCollection.

Definition at line 15 of file BucketCollection.cs.

Constructor & Destructor Documentation

◆ Bucket()

MyCaffe.basecode.Bucket.Bucket ( double  fMin,
double  fMax 
)

The constructor.

Parameters
fMinThe minimum value in the range.
fMaxThe maximum value in the range.

Definition at line 28 of file BucketCollection.cs.

Member Function Documentation

◆ Add()

int MyCaffe.basecode.Bucket.Add ( double  fVal,
bool  bForce = false 
)

Attempts to add a new value to the Bucket.

Parameters
fValSpecifies the value to add.
bForceOptionally, forces adding the value to the Bucket.
Returns
Returns 0 if the value falls within the Buckets range and is added, -1 if the value is less than the Bucket range and 1 if the value is greater.

Definition at line 56 of file BucketCollection.cs.

◆ Contains()

int MyCaffe.basecode.Bucket.Contains ( double  fVal)

Tests to see if the Bucket range contains the value.

Parameters
fValSpecifies the value to test.
Returns
Returns 0 if the Bucket contains the value, -1 if the value is less than the Bucket range and 1 if the value is greater.

Definition at line 39 of file BucketCollection.cs.

◆ Load()

static Bucket MyCaffe.basecode.Bucket.Load ( BinaryReader  br)
static

Load a Bucket from a BinaryReader.

Parameters
brSpecifies the BinaryReader.
Returns
The newly loaded Bucket is returned.

Definition at line 146 of file BucketCollection.cs.

◆ Save()

void MyCaffe.basecode.Bucket.Save ( BinaryWriter  bw)

Save the Bucket to a BinaryWriter.

Parameters
bwSpecifies the BinaryWriter.

Definition at line 133 of file BucketCollection.cs.

◆ ToString()

override string MyCaffe.basecode.Bucket.ToString ( )

Returns a string representation of the Bucket.

Returns
The string representation is returned.

Definition at line 124 of file BucketCollection.cs.

Property Documentation

◆ Average

double MyCaffe.basecode.Bucket.Average
get

Returns the average value of all values added to the Bucket.

Definition at line 82 of file BucketCollection.cs.

◆ Count

int MyCaffe.basecode.Bucket.Count
get

Returns the number of items added to the Bucket.

Definition at line 74 of file BucketCollection.cs.

◆ Maximum

double MyCaffe.basecode.Bucket.Maximum
get

Returns the bucket maximum value.

Definition at line 98 of file BucketCollection.cs.

◆ MidPoint

double MyCaffe.basecode.Bucket.MidPoint
get

Returns the bucket midpoint.

Definition at line 106 of file BucketCollection.cs.

◆ Minimum

double MyCaffe.basecode.Bucket.Minimum
get

Returns the bucket minimum value.

Definition at line 90 of file BucketCollection.cs.

◆ Tag

object MyCaffe.basecode.Bucket.Tag
getset

Get/set a user specified tag.

Definition at line 114 of file BucketCollection.cs.


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