Bonmin  1.7
Classes | Public Types | Public Member Functions | Public Attributes
Bonmin::TMat Struct Reference

#include <BonTMatrix.hpp>

List of all members.

Classes

struct  ColumnOrder
 Structure for ordering matrix by columns. More...
struct  RowOrder
 Structure for ordering matrix by columns. More...
struct  TMatOrdering
 Structure for ordering matrix. More...

Public Types

typedef vector< std::pair< int,
int > > 
RowS
 Storage for non empty rows.

Public Member Functions

 TMat ()
 Default constructor.
void freeSpace ()
 TMat (const TMat &other)
 Copy constructor.
 TMat (const CoinPackedMatrix &M, MatrixStorageType T)
 Construct from a CoinPackedMatrix.
TMatoperator= (const TMat &rhs)
 Assignment operator.
TMatoperator= (const CoinPackedMatrix &M)
 Assignment from a CoinPackedMatrix.
void resize (int nnz)
 ~TMat ()
int numNonEmptyRows ()
 Get number of non empty rows.
const RowSnonEmptyRows () const
 Get the list of non empty row.
int numNonEmptyCols ()
 Get number of non empty cols.
const RowSnonEmptyCols () const
 Get the list of non empty row.
const vector< int > & orderByColumns ()
 Orders current matrix by columns.
const vector< int > & orderByRows ()
 Orders current matrix by rows.
void removeDuplicates ()
 Remove the duplicated entries.
void makeQuadUpperDiag ()
 Assuming that this is representing a quadratic form.
void resizeOrdering (vector< int > &ordering, unsigned int newSize)
void create (const CoinPackedMatrix &M)
 Create the TMat from M.
void make_upper_triangular (const MatrixStorageType &T)
void make_lower_to_be_upper ()
void make_full_upper_triangular ()

Public Attributes

int * iRow_
int * jCol_
double * value_
int nnz_
int capacity_
vector< int > columnOrdering_
vector< int > rowOrdering_
RowS nonEmptyRows_
RowS nonEmptyCols_

Detailed Description

Definition at line 22 of file BonTMatrix.hpp.


Member Typedef Documentation

typedef vector< std::pair< int, int> > Bonmin::TMat::RowS

Storage for non empty rows.

first is row number and second is first element in row.

Definition at line 32 of file BonTMatrix.hpp.


Constructor & Destructor Documentation

Bonmin::TMat::TMat ( ) [inline]

Default constructor.

Definition at line 35 of file BonTMatrix.hpp.

Bonmin::TMat::TMat ( const TMat other)

Copy constructor.

Bonmin::TMat::TMat ( const CoinPackedMatrix &  M,
MatrixStorageType  T 
)

Construct from a CoinPackedMatrix.

Bonmin::TMat::~TMat ( )

Member Function Documentation

void Bonmin::TMat::freeSpace ( ) [inline]

Definition at line 40 of file BonTMatrix.hpp.

References iRow_, jCol_, and value_.

TMat& Bonmin::TMat::operator= ( const TMat rhs)

Assignment operator.

TMat& Bonmin::TMat::operator= ( const CoinPackedMatrix &  M)

Assignment from a CoinPackedMatrix.

void Bonmin::TMat::resize ( int  nnz) [inline]

Definition at line 58 of file BonTMatrix.hpp.

References iRow_, jCol_, nnz_, Bonmin::resizeAndCopyArray(), and value_.

int Bonmin::TMat::numNonEmptyRows ( )

Get number of non empty rows.

const RowS& Bonmin::TMat::nonEmptyRows ( ) const [inline]

Get the list of non empty row.

Definition at line 71 of file BonTMatrix.hpp.

References nonEmptyRows_.

int Bonmin::TMat::numNonEmptyCols ( )

Get number of non empty cols.

const RowS& Bonmin::TMat::nonEmptyCols ( ) const [inline]

Get the list of non empty row.

Definition at line 78 of file BonTMatrix.hpp.

References nonEmptyCols_.

const vector<int>& Bonmin::TMat::orderByColumns ( ) [inline]

Orders current matrix by columns.

Definition at line 118 of file BonTMatrix.hpp.

References columnOrdering_, nnz_, and resizeOrdering().

const vector<int>& Bonmin::TMat::orderByRows ( ) [inline]

Orders current matrix by rows.

Definition at line 124 of file BonTMatrix.hpp.

References nnz_, resizeOrdering(), and rowOrdering_.

void Bonmin::TMat::removeDuplicates ( )

Remove the duplicated entries.

void Bonmin::TMat::makeQuadUpperDiag ( )

Assuming that this is representing a quadratic form.

Produce equivalent quadratic form with only upper triange stored.

void Bonmin::TMat::resizeOrdering ( vector< int > &  ordering,
unsigned int  newSize 
) [inline]

Definition at line 137 of file BonTMatrix.hpp.

Referenced by orderByColumns(), and orderByRows().

void Bonmin::TMat::create ( const CoinPackedMatrix &  M)

Create the TMat from M.

void Bonmin::TMat::make_upper_triangular ( const MatrixStorageType T)
void Bonmin::TMat::make_lower_to_be_upper ( )
void Bonmin::TMat::make_full_upper_triangular ( )

Member Data Documentation

Definition at line 25 of file BonTMatrix.hpp.

Referenced by freeSpace(), and resize().

Definition at line 27 of file BonTMatrix.hpp.

Definition at line 147 of file BonTMatrix.hpp.

Referenced by orderByColumns().

Definition at line 149 of file BonTMatrix.hpp.

Referenced by orderByRows().

Definition at line 158 of file BonTMatrix.hpp.

Referenced by nonEmptyRows().

Definition at line 161 of file BonTMatrix.hpp.

Referenced by nonEmptyCols().


The documentation for this struct was generated from the following file: