#include <IpTripletToDenseConverter.hpp>
Public Member Functions | |
Index | InitializeConverter (Index dim, Index nonzeros, const Index *airn, const Index *ajcn) |
Initialize the converter, given the fixed structure of the matrix. | |
const Index * | IA () const |
Return the IA array for the condensed format. | |
const Index * | JA () const |
Return the JA array for the condensed format. | |
void | ConvertValues (Index nonzeros_triplet, const Number *a_triplet, Index nonzeros_compressed, Number *a_compressed) |
Convert the values of the nonzero elements. | |
Constructor/Destructor | |
TripletToDenseConverter (Index offset) | |
Destructor. | |
virtual | ~TripletToDenseConverter () |
Destructor. | |
Classes | |
class | TripletEntry |
Class for one triplet position entry. |
TripletToDenseConverter | ( | Index | offset | ) |
~TripletToDenseConverter | ( | ) | [virtual] |
Destructor.
Initialize the converter, given the fixed structure of the matrix.
There, ndim gives the number of rows and columns of the matrix, nonzeros give the number of nonzero elements, and airn and acjn give the positions of the nonzero elements. The return value is the number of nonzeros in the condensed matrix. (Since nonzero elements can be listed several times in the triplet format, it is possible that this value is different from the input value nonzeros.) This method must be called before the GetIA, GetJA, GetValues methods are called.
References DBG_ASSERT, DBG_START_METH, and fkinkryx::i.
const Index* IA | ( | ) | const [inline] |
const Index* JA | ( | ) | const [inline] |
void ConvertValues | ( | Index | nonzeros_triplet, | |
const Number * | a_triplet, | |||
Index | nonzeros_compressed, | |||
Number * | a_compressed | |||
) |
Convert the values of the nonzero elements.
Given the values a_triplet for the triplet format, return the array of values for the condensed format in a_condensed. nonzeros_condensed is the length of the array a_condensed and must be identical to the return value of InitializeConverter.
References DBG_ASSERT, DBG_START_METH, and fkinkryx::i.