Represents a row or a column of a sparse matrix.
More...
#include <geogram/NL/nl_matrix.h>
|
NLuint | size |
| number of coefficients.
|
|
NLuint | capacity |
| number of coefficients that can be stored without reallocating memory.
|
|
NLCoeff * | coeff |
| the array of coefficients, with enough space to store capacity coefficients.
|
|
Represents a row or a column of a sparse matrix.
Definition at line 151 of file nl_matrix.h.
◆ nlRowColumnAdd()
Adds a coefficient to an NLRowColumn.
Performs the following operation: \( a_i \leftarrow a_i + value \). If the NLRowColumn already has a coefficient with index index
, then the value is added to that coefficient, else a new coefficient is created. Additional storage is allocated as need be.
- Parameters
-
[in,out] | c | a pointer to an NLRowColumn |
[in] | index | index of the coefficient |
[in] | value | value of the coefficient |
◆ nlRowColumnAppend()
Appends a coefficient to an NLRowColumn .
In contrast with nlRowColumnAdd(), this function does not tests whether a coefficient with index index
already exists in the NLRowColumn. A new coefficient is always created.
- Parameters
-
[in,out] | c | a pointer to an NLRowColumn |
[in] | index | index of the coefficient |
[in] | value | value of the coefficient |
◆ nlRowColumnClear()
NLAPI void NLAPIENTRY nlRowColumnClear |
( |
NLRowColumn * |
c | ) |
|
|
related |
Zeroes an NLRowColumn and deallocates the memory used by the NLRowColumn.
On exit, capacity is zeroed
- Parameters
-
◆ nlRowColumnConstruct()
NLAPI void NLAPIENTRY nlRowColumnConstruct |
( |
NLRowColumn * |
c | ) |
|
|
related |
◆ nlRowColumnDestroy()
NLAPI void NLAPIENTRY nlRowColumnDestroy |
( |
NLRowColumn * |
c | ) |
|
|
related |
◆ nlRowColumnGrow()
NLAPI void NLAPIENTRY nlRowColumnGrow |
( |
NLRowColumn * |
c | ) |
|
|
related |
Allocates additional storage for the coefficients of an NLRowColumn.
Operates like the class vector of the C++ standard library, by doubling the capacity each time it is needed. This amortizes the cost of the growing operations as compared to re-allocating at each element insertion
- Parameters
-
◆ nlRowColumnSort()
NLAPI void NLAPIENTRY nlRowColumnSort |
( |
NLRowColumn * |
c | ) |
|
|
related |
Sorts the coefficients of an NLRowColumn by increasing index.
- Parameters
-
◆ nlRowColumnZero()
NLAPI void NLAPIENTRY nlRowColumnZero |
( |
NLRowColumn * |
c | ) |
|
|
related |
Zeroes an NLRowColumn.
No memory is deallocated, the capacity remains the same.
- Parameters
-
The documentation for this struct was generated from the following file: