Loading...
Searching...
No Matches
ClpNetworkBasis.hpp
Go to the documentation of this file.
/* $Id$ */
// Copyright (C) 2003, International Business Machines
// Corporation and others. All Rights Reserved.
// This code is licensed under the terms of the Eclipse Public License (EPL).
/*
Authors
John Forrest
*/
#ifndef ClpNetworkBasis_H
#define ClpNetworkBasis_H
class ClpMatrixBase;
class CoinIndexedVector;
class ClpSimplex;
#include "CoinTypes.hpp"
#ifndef COIN_FAST_CODE
#define COIN_FAST_CODE
#endif
class ClpNetworkBasis {
public:
ClpNetworkBasis();
ClpNetworkBasis(const ClpSimplex *model,
int numberRows, const CoinFactorizationDouble *pivotRegion,
const int *permuteBack, const int *startColumn,
const int *numberInColumn,
const int *indexRow, const CoinFactorizationDouble *element);
ClpNetworkBasis(const ClpNetworkBasis &other);
~ClpNetworkBasis();
ClpNetworkBasis &operator=(const ClpNetworkBasis &other);
int factorize(const ClpMatrixBase *matrix,
int rowIsBasic[], int columnIsBasic[]);
int replaceColumn(CoinIndexedVector *column,
int pivotRow);
double updateColumn(CoinIndexedVector *regionSparse,
CoinIndexedVector *regionSparse2,
int pivotRow);
int updateColumn(CoinIndexedVector *regionSparse,
double array[]) const;
int updateColumnTranspose(CoinIndexedVector *regionSparse,
double array[]) const;
int updateColumnTranspose(CoinIndexedVector *regionSparse,
CoinIndexedVector *regionSparse2) const;
private:
// checks looks okay
void check();
// prints data
void print();
#ifndef COIN_FAST_CODE
double slackValue_;
#endif
int numberRows_;
int numberColumns_;
const ClpSimplex *model_;
int *parent_;
int *descendant_;
int *pivot_;
int *rightSibling_;
int *leftSibling_;
double *sign_;
int *stack_;
int *permute_;
int *permuteBack_;
int *stack2_;
int *depth_;
char *mark_;
};
#endif
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
*/
ClpMatrixBase
Abstract base class for Clp Matrices.
Definition ClpMatrixBase.hpp:38
ClpNetworkBasis::sign_
double * sign_
Sign of pivot.
Definition ClpNetworkBasis.hpp:128
ClpNetworkBasis::depth_
int * depth_
Depth.
Definition ClpNetworkBasis.hpp:138
ClpNetworkBasis::updateColumn
double updateColumn(CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2, int pivotRow)
Updates one column (FTRAN) from region, Returns pivot value if "pivotRow" >=0.
ClpNetworkBasis::permuteBack_
int * permuteBack_
Permute back array.
Definition ClpNetworkBasis.hpp:134
ClpNetworkBasis::updateColumnTranspose
int updateColumnTranspose(CoinIndexedVector *regionSparse, double array[]) const
Updates one column transpose (BTRAN) For large problems you should ALWAYS know where the nonzeros are...
ClpNetworkBasis::operator=
ClpNetworkBasis & operator=(const ClpNetworkBasis &other)
= copy
ClpNetworkBasis::permute_
int * permute_
Permute into array.
Definition ClpNetworkBasis.hpp:132
ClpNetworkBasis::~ClpNetworkBasis
~ClpNetworkBasis()
Destructor.
ClpNetworkBasis::numberColumns_
int numberColumns_
Number of Columns in factorization.
Definition ClpNetworkBasis.hpp:114
ClpNetworkBasis::pivot_
int * pivot_
Pivot row.
Definition ClpNetworkBasis.hpp:122
ClpNetworkBasis::leftSibling_
int * leftSibling_
Left sibling.
Definition ClpNetworkBasis.hpp:126
ClpNetworkBasis::updateColumn
int updateColumn(CoinIndexedVector *regionSparse, double array[]) const
Updates one column (FTRAN) to/from array For large problems you should ALWAYS know where the nonzeros...
ClpNetworkBasis::parent_
int * parent_
Parent for each column.
Definition ClpNetworkBasis.hpp:118
ClpNetworkBasis::ClpNetworkBasis
ClpNetworkBasis()
Default constructor.
ClpNetworkBasis::factorize
int factorize(const ClpMatrixBase *matrix, int rowIsBasic[], int columnIsBasic[])
When part of LP - given by basic variables.
ClpNetworkBasis::model_
const ClpSimplex * model_
model
Definition ClpNetworkBasis.hpp:116
ClpNetworkBasis::updateColumnTranspose
int updateColumnTranspose(CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2) const
Updates one column (BTRAN) from region2.
ClpNetworkBasis::stack2_
int * stack2_
Second stack.
Definition ClpNetworkBasis.hpp:136
ClpNetworkBasis::replaceColumn
int replaceColumn(CoinIndexedVector *column, int pivotRow)
Replaces one Column to basis, returns 0=OK, 1=Probably OK, 2=singular!
ClpNetworkBasis::mark_
char * mark_
To mark rows.
Definition ClpNetworkBasis.hpp:140
ClpNetworkBasis::stack_
int * stack_
Stack.
Definition ClpNetworkBasis.hpp:130
ClpNetworkBasis::descendant_
int * descendant_
Descendant.
Definition ClpNetworkBasis.hpp:120
ClpNetworkBasis::numberRows_
int numberRows_
Number of Rows in factorization.
Definition ClpNetworkBasis.hpp:112
ClpNetworkBasis::ClpNetworkBasis
ClpNetworkBasis(const ClpNetworkBasis &other)
Copy constructor.
ClpNetworkBasis::print
void print()
ClpNetworkBasis::rightSibling_
int * rightSibling_
Right sibling.
Definition ClpNetworkBasis.hpp:124
ClpNetworkBasis::check
void check()
ClpNetworkBasis::ClpNetworkBasis
ClpNetworkBasis(const ClpSimplex *model, int numberRows, const CoinFactorizationDouble *pivotRegion, const int *permuteBack, const int *startColumn, const int *numberInColumn, const int *indexRow, const CoinFactorizationDouble *element)
Constructor from CoinFactorization.
ClpSimplex
This solves LPs using the simplex method.
Definition ClpSimplex.hpp:106