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 DictionaryOfKeys

    Class defining a dictionary of keys storage for sparse matrix.

    Inheritance
    Object
    DictionaryOfKeys
    Namespace: BRIDGES.LinearAlgebra.Matrices.Storage
    Assembly: BRIDGES.dll
    Syntax
    public sealed class DictionaryOfKeys : IEnumerable<((int, int), double)>

    Constructors

    | Improve this Doc View Source

    DictionaryOfKeys(Double[], Int32[], Int32[])

    Initialises a new instance of the DictionaryOfKeys class.

    Declaration
    public DictionaryOfKeys(double[] values, int[] rows, int[] columns)
    Parameters
    Type Name Description
    Double[] values

    Values of the new DictionaryOfKeys.

    Int32[] rows

    Row indices of the new DictionaryOfKeys.

    Int32[] columns

    Column indices of the new DictionaryOfKeys.

    | Improve this Doc View Source

    DictionaryOfKeys(Int32)

    Initialises a new instance of the DictionaryOfKeys class.

    Declaration
    public DictionaryOfKeys(int capacity)
    Parameters
    Type Name Description
    Int32 capacity

    Capacity of the dictionnary of keys.

    Properties

    | Improve this Doc View Source

    Count

    Gets the number of elements in the DictionaryOfKeys.

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

    Methods

    | Improve this Doc View Source

    Add(Double, Int32, Int32)

    Adds an element to the storage. If the storage contains an element at the given row and column, the value is added to the existing one.

    Declaration
    public void Add(double value, int row, int column)
    Parameters
    Type Name Description
    Double value

    Value to add.

    Int32 row

    Row index of the value.

    Int32 column

    Column index of the value.

    | Improve this Doc View Source

    AddOrReplace(Double, Int32, Int32)

    Adds an element to the storage. If the storage contains an element at the given row and column, the value replaces the existing one.

    Declaration
    public void AddOrReplace(double value, int row, int column)
    Parameters
    Type Name Description
    Double value

    Value to add.

    Int32 row

    Row index of the value.

    Int32 column

    Column index of the value.

    | Improve this Doc View Source

    Clean(Double)

    Removes all zeros in the storage.

    Declaration
    public void Clean(double tolerance)
    Parameters
    Type Name Description
    Double tolerance

    Tolerance around the zero.

    | Improve this Doc View Source

    GetEnumerator()

    Returns an enumerator which reads through the non-zero components of the current DictionaryOfKeys.
    The represents is composed of the row-column pair and the component value.

    Declaration
    public IEnumerator<((int, int), double)> GetEnumerator()
    Returns
    Type Description
    IEnumerator<(, )<(, )<Int32, Int32>, Double>>

    The enumerator of the DictionaryOfKeys.

    | Improve this Doc View Source

    IsEmpty(Int32, Int32)

    Evaluates whether the DictionaryOfKeys contains an element at the given row and column index.

    Declaration
    public bool IsEmpty(int row, int column)
    Parameters
    Type Name Description
    Int32 row

    Row index.

    Int32 column

    Column index.

    Returns
    Type Description
    Boolean

    true if the storage doesn't have element at the specified row and column index, false otherwise.

    | Improve this Doc View Source

    Remove(Int32, Int32)

    Removes an element of the storage at the given row and column.

    Declaration
    public void Remove(int row, int column)
    Parameters
    Type Name Description
    Int32 row

    Row index of the value.

    Int32 column

    Column index of the value.

    | Improve this Doc View Source

    Replace(Double, Int32, Int32)

    Replaces an element of the storage at the given row and column.

    Declaration
    public void Replace(double value, int row, int column)
    Parameters
    Type Name Description
    Double value

    Value to replace with.

    Int32 row

    Row index of the value.

    Int32 column

    Column index of the value.

    • Improve this Doc
    • View Source
    In This Article
    Back to top By ENPC and the Build'In Platform