Creates a Vector.Constant object from a list of Scalar.Constant
objects. One may optionally pass in a string by which this
object
may be identified by.
Using the constructor directly for creating vector objects is not recommended.
The fixed value this
should represent.
The name by which this
is identified.
The name by which this
is identified. This is optional and defaults
to the empty string ""
.
Returns the components of this
vector. The index values start
from 1
instead of the commonly used starting index 0
.
The Scalar element at given index.
Evaluates and returns the negated value of a vector constant. A negative vector \( - \overrightarrow{A} \) is defined such that
\[ \overrightarrow{A} + \left( - \overrightarrow{A} \right) = \overrightarrow{0} \].
Component wise, if \( \overrightarrow{A} = a_i \hat{e_i} \), it can be expressed as
\[ - \overrightarrow{A} = -a_i \hat{e_i} \].
Adds two Vector.Constant objects numerically.
The Vector.Constant to add to this
.
The vector sum of this
and that
.
Creates and returns a Vector.Expression for the addition of
two Vector objects. The type of this
does not matter because
adding a variable vector to another vector always results in an expression.
The Vector to add to this
.
Expression for sum of this
and that
.
Calculates the vector product of two Vector.Constant objects numerically.
The Vector.Constant to compute cross product with this
.
The vector product of this
and that
.
Creates and returns a Vector.Expression for the cross product of
two Vector objects. The type of this
does not matter because
cross multiplying a variable vector to another vector always results
in an expression.
The Vector to add to this
.
Expression for vector product of this
and that
.
Calculates the scalar product of two Vector.Constant objects numerically.
The Vector.Constant to compute scalar product with this
.
The inner product of this
and that
.
Creates and returns a Vector.Expression for the dot product of
two Vector objects. The type of this
does not matter because
dot multiplying a variable vector with another vector always results
in an expression.
The Vector to add to this
.
Expression for inner product of this
and that
.
Checks for equality of two vector constants. The equality check
for floating point numbers becomes problematic in the decimal system.
The binary representation is finite and therefore even if two values
are in fact equal they may not return true by using the ==
or ===
equality. To tackle this problem we use a tolerance value, if the
difference of the two numerical values is less than that tolerance
value then we can assume the values to be practically equal. Smaller
tolerance values will result in more accurate checks.
This function allows a default tolerance of 1e-14
for floating point numbers.
The value to check equality with.
Checks for equality of two vector constants. The equality check
for floating point numbers becomes problematic in the decimal system.
The binary representation is finite and therefore even if two values
are in fact equal they may not return true by using the ==
or ===
equality. To tackle this problem we use a tolerance value, if the
difference of the two numerical values is less than that tolerance
value then we can assume the values to be practically equal. Smaller
tolerance values will result in more accurate checks.
The value to check equality with.
Checks whether a method exists on the object or as a static member of the class.
Name of the method.
Scales this
Vector.Constant object numerically.
The scale factor.
The scaled vector.
Creates and returns a Vector.Expression for the scaling of
this
Vector object. The type of this
does not matter because
scaling a variable vector always results in an expression.
The scale factor.
Expression for scaling this
.
Subtracts one Vector.Constant object from another numerically.
The Vector.Constant to subtract from this
.
The vector difference of this
from that
.
Creates and returns a Vector.Expression for the subtraction of
two Vector objects. The type of this
does not matter because
subtracting a variable vector from another vector always results in an expression.
The Vector to add to this
.
Expression for subtracting that
from this
.
Computes the magnitude of a constant vector numerically.
Computes the magnitude of a given vector. If A
vector is a constant
vector then numerically calculates the magnitude otherwise creates a
scalar Expression and returns the same.
For a given constant vector A
, numerically evaluates the unit vector along A
.
The Vector.Constant along which the unit vector is to be calculated.
The unit vector along the given Vector A
.
For a given variable vector A
, creates an Expression for the unit vector along A
.
The Vector.Constant along which the unit vector is to be calculated.
The unit vector along the given Vector A
.
Generated using TypeDoc
Represents constant vectors. That is, all the vector components are Scalar.Constants. All the components are interpreted as in the Cartesian system.