Programming Reference for VirtualLab Fusion
2025.1
|
This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Class for a range of physical values.
More...
Public Member Functions | |
override object | Clone () |
Clones the current object. | |
override bool | Equals (object otherObject, EqualityIntent equalityIntent) |
Determines whether the specified Object is equal to this instance. | |
PhysicalValueRange | OverlappingRange (PhysicalValueRange range) |
Method that returns the overlap of this and a given PhysicalValueRange. | |
PhysicalValueRange? | OverlappingRange_within2PI (PhysicalValueRange range) |
Method that returns the overlap of this and a given PhysicalValueRange. | |
PhysicalValueRange (double value1, bool value1isElement, double value2, bool value2isElement, MeasuredQuantity measuredQuantity, string name) | |
Constructor with all parameters but with a single name. | |
PhysicalValueRange (double value1, double value2, MeasuredQuantity measuredQuantity, string name="") | |
Constructor with the most important parameters. | |
PhysicalValueRange (double value1, double value2, PhysicalProperty property) | |
Constructor with the most important parameters. | |
PhysicalValueRange (double value1, string name1, bool value1isElement, double value2, string name2, bool value2isElement, MeasuredQuantity measuredQuantity) | |
Constructor with all parameters. | |
PhysicalValueRange (double value1, string name1, bool value1isElement, double value2, string name2, bool value2isElement, PhysicalProperty property) | |
Constructor with all parameters. | |
PhysicalValueRange (PhysicalValue value1, bool value1isElement, PhysicalValue value2, bool value2isElement) | |
Constructor with physical value parameters and inclusion information. | |
PhysicalValueRange (PhysicalValue value1, PhysicalValue value2) | |
Constructor with physical value parameters. | |
PhysicalValueRange (PhysicalValueRange range) | |
Copy constructor. | |
bool | RangeContainsDoubleValue (double value, bool permissiveCheck) |
Method that checks whether a given double value is contained by this range. | |
bool | RangeContainsDoubleValue (double value, double epsilon) |
Method that checks whether a given double value is contained by this range. | |
bool | RangeContainsRange (PhysicalValueRange range) |
Method that checks whether a given PhysicalValueRange is contained (completely) by this, using the Globals.Epsilon value. | |
bool | RangeContainsRange (PhysicalValueRange range, double epsilon) |
Method that checks whether a given PhysicalValueRange is contained (completely) by this, using a given epsilon value. | |
bool | RangesOverlap (PhysicalValueRange range) |
Method that checks whether a given PhysicalValueRange overlaps with this. | |
bool | RangesOverlap_within2PI (PhysicalValueRange range) |
Method that checks whether a given PhysicalValueRange overlaps with this. | |
AxisNumberFormat | SuggestAxisFormat () |
Suggest an axis format for this. | |
override string | ToString () |
Overridden ToString function. | |
Static Public Member Functions | |
static PhysicalValueRange | GetOrderedRange (PhysicalValueRange valueRange) |
Gets the input range whereas it is ensured that value 1 is not larger than value 2. | |
static bool | operator!= (PhysicalValueRange value1, PhysicalValueRange value2) |
Compares two PhysicalValueRange for inequality. | |
static bool | operator== (PhysicalValueRange range1, PhysicalValueRange range2) |
Compares two PhysicalValueRange for equality. | |
static PhysicalValueRange | SwapValues (PhysicalValueRange valueRangeToSwap) |
Method that returns a new physical value range with swapped values. | |
Properties | |
double | Center [get] |
Gets the center value of the range. | |
string | CommonName [get] |
Gets the common name if Name1 and Name2 are equal. Else null is returned. | |
MeasuredQuantity | MeasuredQuantity [get, set] |
Gets and sets the measured quantity, which in the future will replace the PhysicalProperty. | |
string | Name1 [get, set] |
Meaning of value1. | |
string | Name2 [get, set] |
Meaning of value2. | |
PhysicalProperty | PhysicalProperty [get, set] |
The unit of the physical value. | |
PhysicalValue | PhysicalValue1 [get] |
The value of the first physical value. | |
PhysicalValue | PhysicalValue2 [get] |
The value of the second physical value. | |
double | SignedValueRange [get] |
Gets the difference between Value2 and Value1. | |
double | Value1 [get, set] |
First numerical value. | |
bool | Value1IsElementOfRange [get, set] |
Determines if Value1 is an element of the PhysicalValueRange. | |
double | Value2 [get, set] |
Second numerical value. | |
bool | Value2IsElementOfRange [get, set] |
Determines if Value2 is an element of the PhysicalValueRange. | |
This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Class for a range of physical values.
PhysicalValueRange | ( | double | value1, |
double | value2, | ||
PhysicalProperty | property | ||
) |
Constructor with the most important parameters.
value1 | First numerical value |
value2 | Second numerical value |
property | The unit of the physical value. |
PhysicalValueRange | ( | double | value1, |
double | value2, | ||
MeasuredQuantity | measuredQuantity, | ||
string | name = "" |
||
) |
Constructor with the most important parameters.
value1 | First numerical value |
value2 | Second numerical value |
measuredQuantity | The measured of the physical value (e.g. length). |
name | Optional name describing the physical value range. |
PhysicalValueRange | ( | double | value1, |
string | name1, | ||
bool | value1isElement, | ||
double | value2, | ||
string | name2, | ||
bool | value2isElement, | ||
PhysicalProperty | property | ||
) |
Constructor with all parameters.
value1 | First numerical value |
name1 | Meaning of value1. |
value1isElement | Determines if Value1 is an element of the PhysicalValueRange |
value2 | Second numerical value |
name2 | Meaning of value2. |
value2isElement | Determines if Value2 is an element of the PhysicalValueRange |
property | The unit of the physical value. |
PhysicalValueRange | ( | double | value1, |
bool | value1isElement, | ||
double | value2, | ||
bool | value2isElement, | ||
MeasuredQuantity | measuredQuantity, | ||
string | name | ||
) |
Constructor with all parameters but with a single name.
value1 | First numerical value |
value1isElement | Determines if Value1 is an element of the PhysicalValueRange |
value2 | Second numerical value |
value2isElement | Determines if Value2 is an element of the PhysicalValueRange |
measuredQuantity | The measured of the physical value (e.g. length). |
name | The name describing the physical value range. |
PhysicalValueRange | ( | double | value1, |
string | name1, | ||
bool | value1isElement, | ||
double | value2, | ||
string | name2, | ||
bool | value2isElement, | ||
MeasuredQuantity | measuredQuantity | ||
) |
Constructor with all parameters.
value1 | First numerical value |
name1 | Meaning of value1. |
value1isElement | Determines if Value1 is an element of the PhysicalValueRange |
value2 | Second numerical value |
name2 | Meaning of value2. |
value2isElement | Determines if Value2 is an element of the PhysicalValueRange |
measuredQuantity | The measured of the physical value (e.g. length). |
PhysicalValueRange | ( | PhysicalValue | value1, |
PhysicalValue | value2 | ||
) |
Constructor with physical value parameters.
value1 | First physical value |
value2 | Second physical value |
PhysicalValueRange | ( | PhysicalValue | value1, |
bool | value1isElement, | ||
PhysicalValue | value2, | ||
bool | value2isElement | ||
) |
Constructor with physical value parameters and inclusion information.
value1 | First physical value |
value1isElement | Determines if Value1 is an element of the PhysicalValueRange |
value2 | Second physical value |
value2isElement | Determines if Value2 is an element of the PhysicalValueRange |
PhysicalValueRange | ( | PhysicalValueRange | range | ) |
Copy constructor.
range | Physical value range to copy |
override object Clone | ( | ) |
Clones the current object.
override bool Equals | ( | object | otherObject, |
EqualityIntent | equalityIntent | ||
) |
Determines whether the specified Object is equal to this instance.
otherObject | The Object to compare with this instance. |
equalityIntent | Defines what kind of equality you want to check when comparing two objects, for example all values or just physical equality. |
true
if the specified Object is equal to this instance; otherwise, false
.
|
static |
Gets the input range whereas it is ensured that value 1 is not larger than value 2.
valueRange | The value range. |
|
static |
Compares two PhysicalValueRange for inequality.
value1 | First PhysicalValueRange object to compare. |
value2 | Second PhysicalValueRange object to compare. |
|
static |
Compares two PhysicalValueRange for equality.
range1 | First PhysicalValueRange object to compare. |
range2 | Second PhysicalValueRange object to compare. |
PhysicalValueRange OverlappingRange | ( | PhysicalValueRange | range | ) |
Method that returns the overlap of this and a given PhysicalValueRange.
range | Range with which to calculate the overlap with this instance. |
null
is returned. ArgumentNullException |
PhysicalValueRange? OverlappingRange_within2PI | ( | PhysicalValueRange | range | ) |
Method that returns the overlap of this and a given PhysicalValueRange.
range | Range with which to calculate the overlap with this instance. |
null
is returned. ArgumentNullException |
bool RangeContainsDoubleValue | ( | double | value, |
bool | permissiveCheck | ||
) |
Method that checks whether a given double value is contained by this range.
value | Value to check for lying inside the range |
permissiveCheck | If TRUE, the check will allow the value to be in a small epsilon outside the range. |
bool RangeContainsDoubleValue | ( | double | value, |
double | epsilon | ||
) |
Method that checks whether a given double value is contained by this range.
value | Value to check for lying inside the range |
epsilon | The check will allow the value to lie in a small epsilon outside the range. |
bool RangeContainsRange | ( | PhysicalValueRange | range | ) |
Method that checks whether a given PhysicalValueRange is contained (completely) by this, using the Globals.Epsilon value.
range | Range to be checked if it lies inside this. |
true
if range lies inside this.bool RangeContainsRange | ( | PhysicalValueRange | range, |
double | epsilon | ||
) |
Method that checks whether a given PhysicalValueRange is contained (completely) by this, using a given epsilon value.
range | Range to be checked if it lies inside this. |
epsilon | Epsilon (= relative deviation) to be used for comparison. |
true
if range lies inside this.bool RangesOverlap | ( | PhysicalValueRange | range | ) |
Method that checks whether a given PhysicalValueRange overlaps with this.
range |
bool RangesOverlap_within2PI | ( | PhysicalValueRange | range | ) |
Method that checks whether a given PhysicalValueRange overlaps with this.
range |
AxisNumberFormat SuggestAxisFormat | ( | ) |
Suggest an axis format for this.
|
static |
Method that returns a new physical value range with swapped values.
valueRangeToSwap | Value range whose values are to be swapped. |
override string ToString | ( | ) |
Overridden ToString function.
|
get |
Gets the common name if Name1 and Name2 are equal. Else null
is returned.
|
getset |
Gets and sets the measured quantity, which in the future will replace the PhysicalProperty.