BRIDGES
  • Articles
  • BRIDGES
Search Results for

    Show / Hide Table of Contents
    • Settings
    • LinearAlgebra
      • Vectors
        • DenseVector
        • SparseVector
        • Vector
      • Factorisation
        • SparseQR
      • Matrices
        • DenseMatrix
        • Matrix
        • SparseMatrix
        • Sparse
          • CompressedColumn
          • CompressedRow
        • Storage
          • DictionaryOfKeys
    • Algebra
      • Measure
        • IDotProduct<TSelf, TValue>
        • IMetric<TSelf>
        • INorm<TSelf>
      • Sets
        • IGroupAction<TSelf, TValue>
      • Fundamentals
        • IAddable<T>
    • Solvers
      • GuidedProjection
        • Energy
        • GuidedProjectionAlgorithm
        • LinearisedConstraint
        • QuadraticConstraint
        • VariableSet
        • EnergyTypes
          • SegmentOrthogonality
          • SegmentParallelity
        • Interfaces
          • IEnergyType
          • ILinearisedConstraintType
          • IQuadraticConstraintType
        • QuadraticConstraintTypes
          • CoherentLength
          • LowerBound
          • UpperBound
          • VectorLength
    • Arithmetic
      • Polynomials
        • Multivariate
          • Monomial
          • Polynomial
        • Univariate
          • Polynomial
          • Specials
            • Bernstein
            • BSpline
      • Numbers
        • Complex
        • Quaternion
        • Real
    • Geometry
      • Euclidean3D
        • Basis
        • BSplineCurve
        • BSplineSurface
        • Circle
        • Frame
        • Line
        • NurbsCurve
        • NurbsSurface
        • Plane
        • Point
        • Polyline
        • Ray
        • Segment
        • Sphere
        • Vector
      • Kernel
        • BSplineCurve<TPoint>
        • BSplineSurface<TPoint>
        • CurveParameterFormat
        • IGeometricallyEquatable<T>
      • Projective3D
        • Point
    • DataStructures
      • PolyhedralMeshes
        • IEdge<TPosition>
        • IFace<TPosition>
        • IMesh<TPosition>
        • IVertex<TPosition>
        • FaceVertexMesh
          • Edge<TPosition>
          • Face<TPosition>
          • Mesh<TPosition>
          • Vertex<TPosition>
        • Abstract
          • Edge<TPosition, TVertex, TEdge, TFace>
          • Face<TPosition, TVertex, TEdge, TFace>
          • Mesh<TPosition, TVertex, TEdge, TFace>
          • Vertex<TPosition, TVertex, TEdge, TFace>
        • HalfedgeMesh
          • Edge<TPosition>
          • Face<TPosition>
          • Halfedge<TPosition>
          • Mesh<TPosition>
          • Vertex<TPosition>

    Class Vector

    Class defining a vector in a real vector space.

    Inheritance
    Object
    Vector
    DenseVector
    SparseVector
    Implements
    IEnumerable<Double>
    IDotProduct<Vector, Double>
    INorm<Vector>
    IMetric<Vector>
    IGroupAction<Vector, Double>
    Namespace: BRIDGES.LinearAlgebra.Vectors
    Assembly: BRIDGES.dll
    Syntax
    public abstract class Vector : IEquatable<Vector>, IDotProduct<Vector, double>, INorm<Vector>, IMetric<Vector>, IGroupAction<Vector, double>

    Constructors

    | Improve this Doc View Source

    Vector(Int32)

    Initialises a new instance of the Vector class.

    Declaration
    protected Vector(int size)
    Parameters
    Type Name Description
    Int32 size

    Number of compoenent of the new Vector.

    Properties

    | Improve this Doc View Source

    Item[Int32]

    Gets or sets the component at a given index.

    Declaration
    public abstract double this[int index] { get; set; }
    Parameters
    Type Name Description
    Int32 index

    Index of the component to get or set.

    Property Value
    Type Description
    Double

    The value of the component.

    | Improve this Doc View Source

    Size

    Number of component of this vector.

    Declaration
    public abstract int Size { get; }
    Property Value
    Type Description
    Int32

    Methods

    | Improve this Doc View Source

    Add(Vector, Vector)

    Computes the addition of two Vector.

    Declaration
    public static Vector Add(Vector left, Vector right)
    Parameters
    Type Name Description
    Vector left

    Left Vector for the addition.

    Vector right

    Right Vector for the addition.

    Returns
    Type Description
    Vector

    The Vector resulting from the addition.

    | Improve this Doc View Source

    Divide(Vector, Double)

    Computes the scalar division of a Vector with a number.

    Declaration
    public static Vector Divide(Vector operand, double divisor)
    Parameters
    Type Name Description
    Vector operand

    Vector to divide.

    Double divisor

    number to divide with.

    Returns
    Type Description
    Vector

    The new Vector resulting from the scalar division.

    | Improve this Doc View Source

    Equals(Vector)

    Class defining a vector in a real vector space.

    Declaration
    public virtual bool Equals(Vector other)
    Parameters
    Type Name Description
    Vector other
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    Equals(Object)

    Class defining a vector in a real vector space.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    GetEnumerator()

    Class defining a vector in a real vector space.

    Declaration
    public abstract IEnumerator<double> GetEnumerator()
    Returns
    Type Description
    IEnumerator<Double>
    | Improve this Doc View Source

    GetHashCode()

    Class defining a vector in a real vector space.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32
    | Improve this Doc View Source

    GramSchmidt(IEnumerable<Vector>)

    Ortho-normalise the set of Vector using a Gram-Schimdt process.

    Declaration
    public static Vector[] GramSchmidt(IEnumerable<Vector> vectors)
    Parameters
    Type Name Description
    IEnumerable<Vector> vectors

    Set of Vector to operate on.

    Returns
    Type Description
    Vector[]

    The ortho-normal set of Vector.

    Remarks

    If the vectors are not linearly independent the number of vectors will change.

    | Improve this Doc View Source

    Multiply(Vector, Double)

    Computes the right scalar multiplication of a Vector with a number.

    Declaration
    public static Vector Multiply(Vector operand, double factor)
    Parameters
    Type Name Description
    Vector operand

    Vector to multiply on the right.

    Double factor

    number to multiply with.

    Returns
    Type Description
    Vector

    The new Vector resulting from the right scalar multiplication.

    | Improve this Doc View Source

    Multiply(Double, Vector)

    Computes the left scalar multiplication of a Vector with a number.

    Declaration
    public static Vector Multiply(double factor, Vector operand)
    Parameters
    Type Name Description
    Double factor

    number to multiply with.

    Vector operand

    Vector to multiply on the left.

    Returns
    Type Description
    Vector

    The new Vector resulting from the left scalar multiplication.

    | Improve this Doc View Source

    Norm()

    Computes the length of this vector.

    Declaration
    public virtual double Norm()
    Returns
    Type Description
    Double

    The value of the vector length.

    | Improve this Doc View Source

    Opposite(Vector)

    Computes the opposite of the Vector.

    Declaration
    public static Vector Opposite(Vector operand)
    Parameters
    Type Name Description
    Vector operand

    Vector whose opposite is to be computed.

    Returns
    Type Description
    Vector

    The Vector, opposite of the initial one.

    | Improve this Doc View Source

    SquaredNorm()

    Computes the squared norm of this vector.

    Declaration
    public virtual double SquaredNorm()
    Returns
    Type Description
    Double

    The value of the vector squared norm.

    | Improve this Doc View Source

    Subtract(Vector, Vector)

    Computes the subtraction of two Vector.

    Declaration
    public static Vector Subtract(Vector left, Vector right)
    Parameters
    Type Name Description
    Vector left

    Left Vector to subtract.

    Vector right

    Right Vector to subtract with.

    Returns
    Type Description
    Vector

    The Vector resulting from the subtraction.

    | Improve this Doc View Source

    ToArray()

    Translates this vector into its array representation.

    Declaration
    public abstract double[] ToArray()
    Returns
    Type Description
    Double[]

    The array representing the vector.

    | Improve this Doc View Source

    ToString()

    Class defining a vector in a real vector space.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    | Improve this Doc View Source

    TransposeMultiply(Vector, Vector)

    Computes the multiplication between the transposed left Vector and the right Vector.

    Declaration
    public static double TransposeMultiply(Vector left, Vector right)
    Parameters
    Type Name Description
    Vector left

    Left Vector to transpose, then multiply.

    Vector right

    Right Vector to multiply.

    Returns
    Type Description
    Double

    The scalar value resulting from the operation.

    Operators

    | Improve this Doc View Source

    Addition(Vector, Vector)

    Computes the addition of two Vector.

    Declaration
    public static Vector operator +(Vector left, Vector right)
    Parameters
    Type Name Description
    Vector left

    Left Vector for the addition.

    Vector right

    Right Vector for the addition.

    Returns
    Type Description
    Vector

    The Vector resulting from the addition.

    | Improve this Doc View Source

    Division(Vector, Double)

    Computes the scalar division of a Vector with a number.

    Declaration
    public static Vector operator /(Vector operand, double divisor)
    Parameters
    Type Name Description
    Vector operand

    Vector to divide.

    Double divisor

    number to divide with.

    Returns
    Type Description
    Vector

    The new Vector resulting from the scalar division.

    | Improve this Doc View Source

    Equality(Vector, Vector)

    Evaluates whether two Vector are equal or not.

    Declaration
    public static bool operator ==(Vector left, Vector right)
    Parameters
    Type Name Description
    Vector left

    Left Vector for the comparison.

    Vector right

    Right Vector for the comparison.

    Returns
    Type Description
    Boolean

    true if the two Vector are equal, false otherwise.

    | Improve this Doc View Source

    Inequality(Vector, Vector)

    Evaluates whether two Vector are different.

    Declaration
    public static bool operator !=(Vector left, Vector right)
    Parameters
    Type Name Description
    Vector left

    Left Vector for the comparison.

    Vector right

    Right Vector for the comparison.

    Returns
    Type Description
    Boolean

    true if the two Vector are different, false otherwise.

    | Improve this Doc View Source

    Multiply(Vector, Double)

    Computes the right scalar multiplication of a Vector with a number.

    Declaration
    public static Vector operator *(Vector operand, double factor)
    Parameters
    Type Name Description
    Vector operand

    Vector to multiply on the right.

    Double factor

    number to multiply with.

    Returns
    Type Description
    Vector

    The new Vector resulting from the right scalar multiplication.

    | Improve this Doc View Source

    Multiply(Double, Vector)

    Computes the left scalar multiplication of a Vector with a number.

    Declaration
    public static Vector operator *(double factor, Vector operand)
    Parameters
    Type Name Description
    Double factor

    number to multiply with.

    Vector operand

    Vector to multiply on the left.

    Returns
    Type Description
    Vector

    The new Vector resulting from the left scalar multiplication.

    | Improve this Doc View Source

    Subtraction(Vector, Vector)

    Computes the subtraction of two Vector.

    Declaration
    public static Vector operator -(Vector left, Vector right)
    Parameters
    Type Name Description
    Vector left

    Left Vector to subtract.

    Vector right

    Right Vector to subtract with.

    Returns
    Type Description
    Vector

    The Vector resulting from the subtraction.

    | Improve this Doc View Source

    UnaryNegation(Vector)

    Computes the opposite of the Vector.

    Declaration
    public static Vector operator -(Vector operand)
    Parameters
    Type Name Description
    Vector operand

    Vector whose opposite is to be computed.

    Returns
    Type Description
    Vector

    The Vector, opposite of the initial one.

    Explicit Interface Implementations

    | Improve this Doc View Source

    IDotProduct<Vector, Double>.DotProduct(Vector)

    Computes the dot product of this element with another element.

    Declaration
    double IDotProduct<Vector, double>.DotProduct(Vector other)
    Parameters
    Type Name Description
    Vector other
    Returns
    Type Description
    Double

    The value of the dot product of the two elements.

    | Improve this Doc View Source

    IMetric<Vector>.DistanceTo(Vector)

    Computes the distance of this element to another element.

    Declaration
    double IMetric<Vector>.DistanceTo(Vector other)
    Parameters
    Type Name Description
    Vector other
    Returns
    Type Description
    Double

    The value of the distance between the two elements.

    | Improve this Doc View Source

    IGroupAction<Vector, Double>.Divide(Double)

    Computes the right scalar division of the current element.

    Declaration
    Vector IGroupAction<Vector, double>.Divide(double divisor)
    Parameters
    Type Name Description
    Double divisor
    Returns
    Type Description
    Vector

    The new element resulting from the scalar dividion.

    | Improve this Doc View Source

    IGroupAction<Vector, Double>.Multiply(Double)

    Computes the right scalar multiplication of the current element.

    Declaration
    Vector IGroupAction<Vector, double>.Multiply(double factor)
    Parameters
    Type Name Description
    Double factor
    Returns
    Type Description
    Vector

    The new element resulting from the scalar multiplication.

    Implements

    IEnumerable<>
    IDotProduct<TSelf, TValue>
    INorm<TSelf>
    IMetric<TSelf>
    IGroupAction<TSelf, TValue>
    • Improve this Doc
    • View Source
    In This Article
    Back to top By ENPC and the Build'In Platform