Adds two Vectors together. If this
and that
are both constants
then vectorially adds the two and returns a new Vector.Constant object
otherwise creates an Expression out of them and returns the same.
The scalar to add this
with.
The result of algebraic addition.
Evaluates the vector product of this
and that
. If both are constants
then numerically computes the product and returns a Vector.Constant object
otherwise creates an Expression out of them and returns the same.
The scalar to subtract from this
.
The vector product of this
and that
.
Evaluates the scalar product of this
and that
. If both are constants
then numerically computes the product and returns a Scalar.Constant object
otherwise creates an Expression out of them and returns the same.
The scalar to subtract from this
.
The inner product of this
and that
.
Scales, or multiplies the "size" (magnitude) of, this
vector by given
amount. If this
and k
are both constants then numerically calculates
the scaled vector otherwise creates an Expression out of them and
returns the same.
The scale factor.
The scaled vector.
Subtracts that
from this
. If this
and that
are both constants
then vectorially subtracts one from the other and returns a new
Vector.Constant object otherwise creates an Expression out of them
and returns the same.
The scalar to subtract from this
.
The result of algebraic subtraction.
Creates a new Vector.Constant object from a list of numbers if it has not been created before. Otherwise just returns the previously created object.
This is the recommended way of creating Vector.Constant objects instead of using the constructor.
The fixed value the Vector.Constant is supposed to represent.
Defines a named Vector.Constant object from a list of numbers if it has not been created before. Otherwise just returns the previously created object.
This is the recommended way of creating named Vector.Constant objects instead of using the constructor.
The fixed value the Vector.Constant is supposed to represent.
The string with which this
object is identified.
Creates a new Vector.Constant object from a list of Scalar.Constant objects if it has not been created before. Otherwise just returns the previously created object.
This is the recommended way of creating Vector.Constant objects instead of using the constructor.
The fixed value the Vector.Constant is supposed to represent.
Defines a named Vector.Constant object from a list of Scalar.Constant objects if it has not been created before. Otherwise just returns the previously created object.
This is the recommended way of creating named Vector.Constant objects instead of using the constructor.
The fixed value the Vector.Constant is supposed to represent.
The string with which this
object is identified.
Returns a previously declared named Vector.Constant object.
The name of the named Vector.Constant object to be retrieved.
Computes the magnitude of a constant vector numberically.
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
, numberically 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
.
Creates a new Vector.Variable object if it has not been created before. Otherwise just returns the previously created object.
This is the recommended way of creating Vector.Variable objects instead of using the constructor.
The string with which this
object will be identified.
Creates a Vector.Variable object from an array. The array may
contain known scalar constants and, for the components yet unknown,
__. Passing __
as an element of the value
array automatically
gets interpreted as having a variable at that index. This allows for
creation of vectors whose few components are known before hand and
the rest are not. For example,
const A = Vector.variable("A", [1, __, 4, __, 2]);
console.log(A);
This line of code will create a vector whose 2nd and 4th components are Scalar.Variable objects and the remaining will be Scalar.Constant objects.
This is the recommended way of creating Vector.Variable objects instead of using the constructor.
The name with which the Vector.Variable is going to be identified.
The array containing the values with which to initialise the vector variable object.
Generated using TypeDoc
Base class to work with vector quantities.