MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The Log class provides general output in text form. More...
Public Member Functions | |
Log (string strSrc) | |
The Log constructor. More... | |
void | WriteLine (string str, bool bOverrideEnabled=false, bool bHeader=false, bool bError=false, bool bDisable=false) |
Write a line of output. More... | |
void | WriteHeader (string str) |
Write a header as output. More... | |
void | WriteError (Exception e) |
Write an error as output. More... | |
void | EXPECT_EQUAL< T > (double df1, double df2, string str=null) |
Test whether two values are equal using a given type 'T'. More... | |
void | EXPECT_NEAR_FLOAT (double df1, double df2, double dfErr, string str="") |
Test whether two numbers are within a range (dfErr) of one another using the float resolution. More... | |
void | EXPECT_NEAR (double df1, double df2, double dfErr, string str="") |
Test whether two numbers are within a range (dfErr) of one another using the double resolution. More... | |
void | CHECK (bool b, string str) |
Test a flag for true. More... | |
void | CHECK_EQ (double df1, double df2, string str) |
Test whether one number is equal to another. More... | |
void | CHECK_NE (double df1, double df2, string str) |
Test whether one number is not-equal to another. More... | |
void | CHECK_LE (double df1, double df2, string str) |
Test whether one number is less than or equal to another. More... | |
void | CHECK_LT (double df1, double df2, string str) |
Test whether one number is less than another. More... | |
void | CHECK_GE (double df1, double df2, string str) |
Test whether one number is greater than or equal to another. More... | |
void | CHECK_GT (double df1, double df2, string str) |
Test whether one number is greater than another. More... | |
void | CHECK_EQ (float f1, float f2, string str) |
Test whether one number is equal to another. More... | |
void | CHECK_NE (float f1, float f2, string str) |
Test whether one number is not equal to another. More... | |
void | CHECK_LE (float f1, float f2, string str) |
Test whether one number is less-than or equal to another. More... | |
void | CHECK_LT (float f1, float f2, string str) |
Test whether one number is less-than another. More... | |
void | CHECK_GE (float f1, float f2, string str) |
Test whether one number is greater-than or equal to another. More... | |
void | CHECK_GT (float f1, float f2, string str) |
Test whether one number is greater-than another. More... | |
void | CHECK_BOUNDS (float f1, float fmin, float fmax, string str) |
Test whether a number falls within a set bound or not. More... | |
void | FAIL (string str) |
Causes a failure which throws an exception with the desciptive text. More... | |
Properties | |
bool | Enable [set] |
Enables/disables the Log. When disabled, the Log does not output any data. More... | |
bool | IsEnabled [get] |
Returns whether or not the Log is enabled. More... | |
string | PreText [getset] |
Get/set the pre-text prepended to each output line when set. More... | |
bool | EnableTrace [getset] |
Enables/disables the Trace. When enabled, the .Net Trace.WriteLine is called in addition to the normal Log output. This is primarily used when debugging. More... | |
double | Progress [getset] |
Get/set the progress associated with the Log. More... | |
Events | |
EventHandler< LogArg > | OnWriteLine |
The OnWriteLine event fires each time the WriteLine, WriteHeader or WriteError functions are called. More... | |
EventHandler< LogProgressArg > | OnProgress |
The OnProgress event fires each time the Progress value is set. More... | |
MyCaffe.basecode.Log.Log | ( | string | strSrc | ) |
void MyCaffe.basecode.Log.CHECK | ( | bool | b, |
string | str | ||
) |
void MyCaffe.basecode.Log.CHECK_BOUNDS | ( | float | f1, |
float | fmin, | ||
float | fmax, | ||
string | str | ||
) |
void MyCaffe.basecode.Log.CHECK_EQ | ( | double | df1, |
double | df2, | ||
string | str | ||
) |
void MyCaffe.basecode.Log.CHECK_EQ | ( | float | f1, |
float | f2, | ||
string | str | ||
) |
void MyCaffe.basecode.Log.CHECK_GE | ( | double | df1, |
double | df2, | ||
string | str | ||
) |
void MyCaffe.basecode.Log.CHECK_GE | ( | float | f1, |
float | f2, | ||
string | str | ||
) |
void MyCaffe.basecode.Log.CHECK_GT | ( | double | df1, |
double | df2, | ||
string | str | ||
) |
void MyCaffe.basecode.Log.CHECK_GT | ( | float | f1, |
float | f2, | ||
string | str | ||
) |
void MyCaffe.basecode.Log.CHECK_LE | ( | double | df1, |
double | df2, | ||
string | str | ||
) |
void MyCaffe.basecode.Log.CHECK_LE | ( | float | f1, |
float | f2, | ||
string | str | ||
) |
void MyCaffe.basecode.Log.CHECK_LT | ( | double | df1, |
double | df2, | ||
string | str | ||
) |
void MyCaffe.basecode.Log.CHECK_LT | ( | float | f1, |
float | f2, | ||
string | str | ||
) |
void MyCaffe.basecode.Log.CHECK_NE | ( | double | df1, |
double | df2, | ||
string | str | ||
) |
void MyCaffe.basecode.Log.CHECK_NE | ( | float | f1, |
float | f2, | ||
string | str | ||
) |
void MyCaffe.basecode.Log.EXPECT_EQUAL< T > | ( | double | df1, |
double | df2, | ||
string | str = null |
||
) |
Test whether two values are equal using a given type 'T'.
T | Specifies the resolution for the test: either double or float. |
df1 | Specifies the first value to test. |
df2 | Specifies the second value to test. |
str | Specifies the descriptive text to output if the test fails. |
void MyCaffe.basecode.Log.EXPECT_NEAR | ( | double | df1, |
double | df2, | ||
double | dfErr, | ||
string | str = "" |
||
) |
Test whether two numbers are within a range (dfErr) of one another using the double resolution.
df1 | Specifies the first value to test. |
df2 | Specifies the second value to test. |
dfErr | Specifies the acceptable error for the test. |
str | Specifies the descriptive text to output if the test fails. |
void MyCaffe.basecode.Log.EXPECT_NEAR_FLOAT | ( | double | df1, |
double | df2, | ||
double | dfErr, | ||
string | str = "" |
||
) |
Test whether two numbers are within a range (dfErr) of one another using the float resolution.
df1 | Specifies the first value to test. |
df2 | Specifies the second value to test. |
dfErr | Specifies the acceptable error for the test. |
str | Specifies the descriptive text to output if the test fails. |
void MyCaffe.basecode.Log.FAIL | ( | string | str | ) |
void MyCaffe.basecode.Log.WriteError | ( | Exception | e | ) |
void MyCaffe.basecode.Log.WriteHeader | ( | string | str | ) |
void MyCaffe.basecode.Log.WriteLine | ( | string | str, |
bool | bOverrideEnabled = false , |
||
bool | bHeader = false , |
||
bool | bError = false , |
||
bool | bDisable = false |
||
) |
Write a line of output.
str | Specifies the string to output. |
bOverrideEnabled | Specifies whether or not to override the enabled state (default = false). |
bHeader | Specifies whether or not the output text represents a header (default = false). |
bError | Specfifies whether or not the output text represents an error (default = false). |
bDisable | Specifies whether or not to disable the output of this line (e.g. used internally). |
|
set |
|
getset |
|
get |
|
getset |
|
getset |
EventHandler<LogProgressArg> MyCaffe.basecode.Log.OnProgress |
EventHandler<LogArg> MyCaffe.basecode.Log.OnWriteLine |