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 Matrix

    Class defining a matrix.

    Inheritance
    Object
    Matrix
    DenseMatrix
    SparseMatrix
    Implements
    IGroupAction<Matrix, Double>
    Namespace: BRIDGES.LinearAlgebra.Matrices
    Assembly: BRIDGES.dll
    Syntax
    public abstract class Matrix : object, IGroupAction<Matrix, double>

    Constructors

    | Improve this Doc View Source

    Matrix(Int32, Int32)

    Initialises a new instance of the Matrix class.

    Declaration
    protected Matrix(int rowCount, int columnCount)
    Parameters
    Type Name Description
    Int32 rowCount

    Number of rows of the Matrix.

    Int32 columnCount

    Number of columns of the Matrix.

    Properties

    | Improve this Doc View Source

    ColumnCount

    Gets the number of columns in this matrix.

    Declaration
    public abstract int ColumnCount { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    RowCount

    Gets the number of rows in this matrix.

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

    Methods

    | Improve this Doc View Source

    Add(Matrix, Matrix)

    Computes the addition of two Matrix.

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

    Left Matrix for the addition.

    Matrix right

    Right Matrix for the addition.

    Returns
    Type Description
    Matrix

    The Matrix resulting from the addition.

    | Improve this Doc View Source

    At(Int32, Int32)

    Get the value of the matrix at the given row and column index.

    Declaration
    public abstract double At(int row, int column)
    Parameters
    Type Name Description
    Int32 row

    Row index of the value to get.

    Int32 column

    Column index of the value to get.

    Returns
    Type Description
    Double

    The value at the given row and column index.

    | Improve this Doc View Source

    Divide(Matrix, Double)

    Computes the scalar division of a Matrix with a number.

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

    Matrix to divide.

    Double divisor

    number to divide with.

    Returns
    Type Description
    Matrix

    The new Matrix resulting from the scalar division.

    | Improve this Doc View Source

    Multiply(Matrix, Matrix)

    Computes the multiplication of two Matrix.

    Declaration
    public static Matrix Multiply(Matrix left, Matrix right)
    Parameters
    Type Name Description
    Matrix left

    Left Matrix for the multiplication.

    Matrix right

    Right Matrix for the multiplication.

    Returns
    Type Description
    Matrix

    The Matrix resulting from the multiplication.

    | Improve this Doc View Source

    Multiply(Matrix, DenseVector)

    Computes the right multiplication of a Matrix with a DenseVector : A·V.

    Declaration
    public static DenseVector Multiply(Matrix matrix, DenseVector vector)
    Parameters
    Type Name Description
    Matrix matrix

    Matrix to multiply on the right.

    DenseVector vector

    DenseVector to multiply with.

    Returns
    Type Description
    DenseVector

    The new DenseVector resulting from the multiplication.

    | Improve this Doc View Source

    Multiply(Matrix, SparseVector)

    Computes the right multiplication of a Matrix with a SparseVector : A·V.

    Declaration
    public static Vector Multiply(Matrix matrix, SparseVector vector)
    Parameters
    Type Name Description
    Matrix matrix

    Matrix to multiply on the right.

    SparseVector vector

    SparseVector to multiply with.

    Returns
    Type Description
    Vector

    The new SparseVector resulting from the multiplication.

    | Improve this Doc View Source

    Multiply(Matrix, Vector)

    Computes the right multiplication of a Matrix with a Vector : A·V.

    Declaration
    public static Vector Multiply(Matrix matrix, Vector vector)
    Parameters
    Type Name Description
    Matrix matrix

    Matrix to multiply on the right.

    Vector vector

    Vector to multiply with.

    Returns
    Type Description
    Vector

    The new Vector resulting from the multiplication.

    | Improve this Doc View Source

    Multiply(Matrix, Double)

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

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

    Matrix to multiply on the right.

    Double factor

    number to multiply with.

    Returns
    Type Description
    Matrix

    The new Matrix resulting from the right scalar multiplication.

    | Improve this Doc View Source

    Multiply(Double, Matrix)

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

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

    number to multiply with.

    Matrix operand

    Matrix to multiply on the left.

    Returns
    Type Description
    Matrix

    The new Matrix resulting from the left scalar multiplication.

    | Improve this Doc View Source

    Opposite(Matrix)

    Computes the opposite of the Matrix.

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

    Matrix whose opposite is to be computed.

    Returns
    Type Description
    Matrix

    The Matrix, opposite of the initial one.

    | Improve this Doc View Source

    Subtract(Matrix, Matrix)

    Computes the subtraction of two Matrix.

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

    Left Matrix to subtract.

    Matrix right

    Right Matrix to subtract with.

    Returns
    Type Description
    Matrix

    The Matrix resulting from the subtraction.

    | Improve this Doc View Source

    ToArray()

    Translates this matrix into its bi-dimensional array representation.

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

    The bi-dimensional array representing the matrix.

    | Improve this Doc View Source

    Transpose(Matrix)

    Transposes the Matrix

    Declaration
    public static Matrix Transpose(Matrix matrix)
    Parameters
    Type Name Description
    Matrix matrix

    Matrix to tranpose.

    Returns
    Type Description
    Matrix

    The new Matrix, transposed of the initial one.

    | Improve this Doc View Source

    TransposeMultiply(Matrix, DenseVector)

    Computes the right multiplication of a transposed Matrix with a DenseVector : At·V.

    Declaration
    public static DenseVector TransposeMultiply(Matrix matrix, DenseVector vector)
    Parameters
    Type Name Description
    Matrix matrix

    Matrix to transpose then multiply on the right.

    DenseVector vector

    DenseVector to multiply with.

    Returns
    Type Description
    DenseVector

    The new DenseVector resulting from the multiplication.

    | Improve this Doc View Source

    TransposeMultiply(Matrix, SparseVector)

    Computes the right multiplication of a transposed Matrix with a SparseVector : At·V.

    Declaration
    public static Vector TransposeMultiply(Matrix matrix, SparseVector vector)
    Parameters
    Type Name Description
    Matrix matrix

    Matrix to transpose then multiply on the right.

    SparseVector vector

    SparseVector to multiply with.

    Returns
    Type Description
    Vector

    The new SparseVector resulting from the multiplication.

    | Improve this Doc View Source

    TransposeMultiply(Matrix, Vector)

    Computes the right multiplication of a transposed Matrix with a Vector : At·V.

    Declaration
    public static Vector TransposeMultiply(Matrix matrix, Vector vector)
    Parameters
    Type Name Description
    Matrix matrix

    Matrix to transpose then multiply on the right.

    Vector vector

    Vector to multiply with.

    Returns
    Type Description
    Vector

    The new Vector resulting from the multiplication.

    | Improve this Doc View Source

    TransposeMultiplySelf(Matrix)

    Computes the left multiplication of a Matrix with its transposition : At·A.

    Declaration
    public static Matrix TransposeMultiplySelf(Matrix operand)
    Parameters
    Type Name Description
    Matrix operand

    Matrix for the operation.

    Returns
    Type Description
    Matrix

    The new Matrix resulting from the operation.

    Operators

    | Improve this Doc View Source

    Addition(Matrix, Matrix)

    Computes the addition of two Matrix.

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

    Left Matrix for the addition.

    Matrix right

    Right Matrix for the addition.

    Returns
    Type Description
    Matrix

    The Matrix resulting from the addition.

    | Improve this Doc View Source

    Division(Matrix, Double)

    Computes the scalar division of a Matrix with a number.

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

    Matrix to divide.

    Double divisor

    number to divide with.

    Returns
    Type Description
    Matrix

    The new Matrix resulting from the scalar division.

    | Improve this Doc View Source

    Multiply(Matrix, Matrix)

    Computes the multiplication of two Matrix.

    Declaration
    public static Matrix operator *(Matrix left, Matrix right)
    Parameters
    Type Name Description
    Matrix left

    Left Matrix for the multiplication.

    Matrix right

    Right Matrix for the multiplication.

    Returns
    Type Description
    Matrix

    The Matrix resulting from the multiplication.

    | Improve this Doc View Source

    Multiply(Matrix, DenseVector)

    Computes the right multiplication of a Matrix with a DenseVector : A·V.

    Declaration
    public static DenseVector operator *(Matrix matrix, DenseVector vector)
    Parameters
    Type Name Description
    Matrix matrix

    Matrix to multiply on the right.

    DenseVector vector

    DenseVector to multiply with.

    Returns
    Type Description
    DenseVector

    The new DenseVector resulting from the multiplication.

    | Improve this Doc View Source

    Multiply(Matrix, SparseVector)

    Computes the right multiplication of a Matrix with a SparseVector : A·V.

    Declaration
    public static Vector operator *(Matrix matrix, SparseVector vector)
    Parameters
    Type Name Description
    Matrix matrix

    Matrix to multiply on the right.

    SparseVector vector

    SparseVector to multiply with.

    Returns
    Type Description
    Vector

    The new SparseVector resulting from the multiplication.

    | Improve this Doc View Source

    Multiply(Matrix, Vector)

    Computes the right multiplication of a Matrix with a Vector : A·V.

    Declaration
    public static Vector operator *(Matrix matrix, Vector vector)
    Parameters
    Type Name Description
    Matrix matrix

    Matrix to multiply on the right.

    Vector vector

    Vector to multiply with.

    Returns
    Type Description
    Vector

    The new Vector resulting from the multiplication.

    | Improve this Doc View Source

    Multiply(Matrix, Double)

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

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

    Matrix to multiply on the right.

    Double factor

    number to multiply with.

    Returns
    Type Description
    Matrix

    The new Matrix resulting from the right scalar multiplication.

    | Improve this Doc View Source

    Multiply(Double, Matrix)

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

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

    number to multiply with.

    Matrix operand

    Matrix to multiply on the left.

    Returns
    Type Description
    Matrix

    The new Matrix resulting from the left scalar multiplication.

    | Improve this Doc View Source

    Subtraction(Matrix, Matrix)

    Computes the subtraction of two Matrix.

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

    Left Matrix to subtract.

    Matrix right

    Right Matrix to subtract with.

    Returns
    Type Description
    Matrix

    The Matrix resulting from the subtraction.

    | Improve this Doc View Source

    UnaryNegation(Matrix)

    Computes the opposite of the Matrix.

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

    Matrix whose opposite is to be computed.

    Returns
    Type Description
    Matrix

    The Matrix, opposite of the initial one.

    Explicit Interface Implementations

    | Improve this Doc View Source

    IGroupAction<Matrix, Double>.Divide(Double)

    Computes the right scalar division of the current element.

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

    The new element resulting from the scalar dividion.

    | Improve this Doc View Source

    IGroupAction<Matrix, Double>.Multiply(Double)

    Computes the right scalar multiplication of the current element.

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

    The new element resulting from the scalar multiplication.

    Implements

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