Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Variable

Represents vector variables. That is, all the vector components are either Scalar.Constants or Scalar.Variables. All the components are interpreted as in the Cartesian system.

Hierarchy

Implements

Index

Constructors

constructor

  • Creates a Vector.Variable object.

    Using the constructor directly for creating vector objects is not recommended.

    see

    Vector.variable

    Parameters

    • name: string

      The name with which the Vector.Variable is going to be identified.

    • Optional dimension: undefined | number

    Returns Variable

  • Creates a Vector.Variable object from an array. The array may contain known {@link Scalar.Constants} and, for the components yet unknown, Scalar.Variable. This allows for creation of vectors whose few components are known before hand and the rest are not.

    Using the constructor directly for creating vector objects is not recommended.

    see

    Vector.variable

    Parameters

    • name: string

      The name with which the Vector.Variable is going to be identified.

    • value: (Constant | Variable)[]

      The array containing the values with which to initialise the vector variable object.

    Returns Variable

Properties

classRef

classRef: Variable = Vector.Variable

dimension

dimension: number

name

name: string

quantity

quantity: "vector" = "vector"

type

type: "variable" = "variable"

value

value: (Constant | Variable)[]

Accessors

X

  • get X(): (Anonymous function)
  • Returns the components of this vector. The index values start from 1 instead of the commonly used starting index 0.

    Returns (Anonymous function)

    The Scalar element at given index.

neg

  • 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} \].

    Returns Expression

Methods

add

cross

  • Creates and returns a Vector.Expression for the cross product of two Vector objects. The type of that does not matter because cross multiplying a variable vector to another vector always results in an expression.

    Parameters

    Returns any

    Expression for vector product of this and that.

dot

  • Creates and returns a Vector.Expression for the dot product of two Vector objects. The type of that does not matter because dot multiplying a variable vector with another vector always results in an expression.

    Parameters

    Returns Expression

    Expression for inner product of this and that.

getDefinition

  • getDefinition(methodName: string): "instance" | "static" | "undefined"
  • Checks whether a method exists on the object or as a static member of the class.

    Parameters

    • methodName: string

      Name of the method.

    Returns "instance" | "static" | "undefined"

scale

sub

  • Creates and returns a Vector.Expression for the subtraction of two Vector objects. The type of that does not matter because subtracting a variable vector from another vector always results in an expression.

    Parameters

    Returns Expression

    Expression for subtracting that from this.

Static mag

Static unit

Generated using TypeDoc