 | SparseMatrixBuilderT Class |
Class SparseMatrixBuilder{T} serves as the base class for the sparse
matrix builder classes of specific types. This class implements the interface
System.Collections.Generic.IDictionary{IntPair,T}, providing matrix-like
row/column indexing for setting and retrieving values. Only nonzero values are stored.
Inheritance Hierarchy Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax[SerializableAttribute]
public class SparseMatrixBuilder<T> : ICloneable,
IDictionary<IntPair, T>, ICollection<KeyValuePair<IntPair, T>>,
IEnumerable<KeyValuePair<IntPair, T>>, IEnumerable
where T : new()
<SerializableAttribute>
Public Class SparseMatrixBuilder(Of T As New)
Implements ICloneable, IDictionary(Of IntPair, T),
ICollection(Of KeyValuePair(Of IntPair, T)), IEnumerable(Of KeyValuePair(Of IntPair, T)),
IEnumerable
[SerializableAttribute]
generic<typename T>
where T : gcnew()
public ref class SparseMatrixBuilder : ICloneable,
IDictionary<IntPair, T>, ICollection<KeyValuePair<IntPair, T>>,
IEnumerable<KeyValuePair<IntPair, T>>, IEnumerable
[<SerializableAttribute>]
type SparseMatrixBuilder<'T when 'T : new()> =
class
interface ICloneable
interface IDictionary<IntPair, 'T>
interface ICollection<KeyValuePair<IntPair, 'T>>
interface IEnumerable<KeyValuePair<IntPair, 'T>>
interface IEnumerable
end
Type Parameters
- T
- Data type of the sparse matrix values.
The SparseMatrixBuilderT type exposes the following members.
Constructors
Properties | Name | Description |
---|
 | Count |
Gets the number of stored nonzero values.
|
 | IsReadOnly |
Gets a value indicating whether collection is read-only.
|
 | ItemIntPair |
Gets and sets the value at the row, column indices specifed in the key.
|
 | ItemInt32, Int32 |
Returns the values stored at the specified zero-based
row and column indices. Note that even though only
nonzero values are stored, the indexer will always return a value.
If there is no value associated with the given indices, zero is
returned.
|
 | Keys |
Gets a collection of the the row, column pairs with nonzero values.
|
 | NumberNonZero |
Gets the number of nonzero stored values.
|
 | Values |
Gets a collection of all the nonzero values.
|
Top
Methods | Name | Description |
---|
 | Add(KeyValuePairIntPair, T) |
Adds the given value at the given row, column indices.
|
 | Add(IntPair, T) |
Adds the given value at the row, column indices specified
by the IntPair argument.
|
 | Clear |
Clears all stored nonzero values.
|
 | Clone |
Constructs a deep copy of self.
|
 | Contains |
Determines if the collection contains a specified value at
at specified row, column indices.
|
 | ContainsKey |
Method for determining if there is a nonzero value at the
row, column indices specified by the given key.
|
 | CopyTo |
Copies the nonzero values to an Array, starting at a particular Array index.
|
 | GetEnumerator |
Returns an enumerator that iterates through the collection of nonzero
values.
|
 | Remove(IntPair) |
Removes a value at the specified row, column indices.
|
 | Remove(KeyValuePairIntPair, T) |
Removes the specified value at the specified row, column indices.
|
 | Remove(Int32, Int32) |
Removes a value at the specified row, column indices.
|
 | TryGetValue |
Get the value at the specified row, column index pair.
|
Top
Fields
See Also