NTPoly
Public Member Functions | Static Public Member Functions | Friends | List of all members
NTPoly::TripletList Class Reference

#include <TripletList.h>

Public Member Functions

 TripletList (int size=0)
 
 TripletList (const DistributedSparseMatrix &matrix)
 
void Resize (int size)
 
void Append (const Triplet &value)
 
void SetTripletAt (int index, const Triplet &value)
 
Triplet GetTripletAt (int index) const
 
 ~TripletList ()
 Standard destructor.
 

Static Public Member Functions

static void SortTripletList (const TripletList &list, int matrix_size, TripletList &sorted)
 

Friends

class SparseMatrix
 
class DistributedSparseMatrix
 

Detailed Description

A data type for a list of triplets. As this is related to matrix multiplication, the referencing indices are rows and columns.

Constructor & Destructor Documentation

◆ TripletList() [1/2]

NTPoly::TripletList::TripletList ( int  size = 0)

Construct the triplet list.

Parameters
sizethe size of the list.

◆ TripletList() [2/2]

NTPoly::TripletList::TripletList ( const DistributedSparseMatrix matrix)

Construct a triplet list from a distributed sparse matrix.

Parameters
matrixto construct from.

Member Function Documentation

◆ Append()

void NTPoly::TripletList::Append ( const Triplet value)

Add a value to the end of the triplet list.

Parameters
valuethe triplet value to append.

◆ GetTripletAt()

Triplet NTPoly::TripletList::GetTripletAt ( int  index) const

Get the triplet value at a given index.

Parameters
indexlocation to get the triplet at.

◆ Resize()

void NTPoly::TripletList::Resize ( int  size)

Increase the size of a triplet list.

Parameters
sizethe new size.

◆ SetTripletAt()

void NTPoly::TripletList::SetTripletAt ( int  index,
const Triplet value 
)

Set a triplet value.

Parameters
indexlocation to set the triplet at.
valuethe triplet value to set.

◆ SortTripletList()

void NTPoly::TripletList::SortTripletList ( const TripletList list,
int  matrix_size,
TripletList sorted 
)
static

Sort a triplet list

Parameters
listto be sorted.
matrix_columnsthis is the highest column value in the list
sorteda now sorted version of the list.

The documentation for this class was generated from the following files: