Table of Contents

Class PhysicalValuePair

Namespace
VirtualLabAPI.Core.Numerics
Assembly
VirtualLabAPI.dll

Class for a pair of physical values.

public class PhysicalValuePair
Inheritance
PhysicalValuePair
Inherited Members

Constructors

PhysicalValuePair(double, double, string, string, MeasuredQuantity, MeasuredQuantity)

Constructor with all parameters.

public PhysicalValuePair(double value1, double value2, string name1, string name2, MeasuredQuantity measuredQuantity1, MeasuredQuantity measuredQuantity2)

Parameters

value1 double

First numerical value

value2 double

Second numerical value

name1 string

First value's name.

name2 string

Second value's name.

measuredQuantity1 MeasuredQuantity

The measured quantity of the first physical value.

measuredQuantity2 MeasuredQuantity

The measured quantity of the second physical value.

PhysicalValuePair(double, double, MeasuredQuantity, MeasuredQuantity)

Constructor with all parameters but the names.

public PhysicalValuePair(double value1, double value2, MeasuredQuantity measuredQuantity1, MeasuredQuantity measuredQuantity2)

Parameters

value1 double

First numerical value

value2 double

Second numerical value

measuredQuantity1 MeasuredQuantity

The measured quantity of the first physical value.

measuredQuantity2 MeasuredQuantity

The measured quantity of the second physical value.

PhysicalValuePair(PhysicalValue, PhysicalValue)

Constructor with two physical value parameters

public PhysicalValuePair(PhysicalValue value1, PhysicalValue value2)

Parameters

value1 PhysicalValue

First physical value

value2 PhysicalValue

Second physical value

PhysicalValuePair(PhysicalValuePair)

Copy constructor.

public PhysicalValuePair(PhysicalValuePair pair)

Parameters

pair PhysicalValuePair

Physical value pair to copy.

PhysicalValuePair(VectorD, MeasuredQuantity)

Constructor taking a VectorD.

public PhysicalValuePair(VectorD value, MeasuredQuantity measuredQuantity)

Parameters

value VectorD

The vector of doubles from which the physical value pair is constructed.

measuredQuantity MeasuredQuantity

The measured quantity of the vector.

Properties

MeasuredQuantity1

The measured quantity of the first value.

public MeasuredQuantity MeasuredQuantity1 { get; set; }

Property Value

MeasuredQuantity

MeasuredQuantity2

The measured quantity of the second value.

public MeasuredQuantity MeasuredQuantity2 { get; set; }

Property Value

MeasuredQuantity

Name1

Meaning of first value.

public string Name1 { get; set; }

Property Value

string

Name2

Meaning of second value.

public string Name2 { get; set; }

Property Value

string

PhysicalValue1

The first physical value.

public PhysicalValue PhysicalValue1 { get; }

Property Value

PhysicalValue

PhysicalValue2

The second physical value.

public PhysicalValue PhysicalValue2 { get; }

Property Value

PhysicalValue

Value_X

First numerical value.

public double Value_X { get; set; }

Property Value

double

Value_Y

Second numerical value.

public double Value_Y { get; set; }

Property Value

double

Values

Gets the pair of values just as vector of two doubles.

public VectorD Values { get; }

Property Value

VectorD

Methods

ToString()

Overridden ToString function.

public override string ToString()

Returns

string

The formatted value.

ToString(int)

Gets a string representing this instance.

public string ToString(int numberOfSignificantDigits)

Parameters

numberOfSignificantDigits int

The number of digits used for formatting of the floating point numbers.

Returns

string

The formatted value.

ToVectorD()

Returns a VectorD with the values of this pair.

public VectorD ToVectorD()

Returns

VectorD

This instance as VectorD.

Operators

operator ==(PhysicalValuePair, PhysicalValuePair)

Compares two PhysicalValuePair for equality.

public static bool operator ==(PhysicalValuePair pair1, PhysicalValuePair pair2)

Parameters

pair1 PhysicalValuePair

First PhysicalValuePair object to compare.

pair2 PhysicalValuePair

Second PhysicalValuePair object to compare.

Returns

bool

Returns true if the two objects are equal.

implicit operator VectorD?(PhysicalValuePair)

Converts a PhysicalValuePair object into a VectorD object.

public static implicit operator VectorD?(PhysicalValuePair physicalValuePair)

Parameters

physicalValuePair PhysicalValuePair

The VectorD object to convert into a VectorD object.

Returns

VectorD?

Converted VectorD object. Null if the physicalValuePair is null.

operator !=(PhysicalValuePair, PhysicalValuePair)

Compares two PhysicalValuePair for inequality.

public static bool operator !=(PhysicalValuePair value1, PhysicalValuePair value2)

Parameters

value1 PhysicalValuePair

First PhysicalValuePair object to compare.

value2 PhysicalValuePair

Second PhysicalValuePair object to compare.

Returns

bool

Returns true if the two objects are unequal.