Clp 1.17.5
Loading...
Searching...
No Matches
ClpNetworkBasis.hpp
Go to the documentation of this file.
1/* $Id: ClpNetworkBasis.hpp 2385 2019-01-06 19:43:06Z unxusr $ */
2// Copyright (C) 2003, International Business Machines
3// Corporation and others. All Rights Reserved.
4// This code is licensed under the terms of the Eclipse Public License (EPL).
5/*
6 Authors
7
8 John Forrest
9
10 */
11#ifndef ClpNetworkBasis_H
12#define ClpNetworkBasis_H
13
14class ClpMatrixBase;
15class CoinIndexedVector;
16class ClpSimplex;
17#include "CoinTypes.hpp"
18#ifndef COIN_FAST_CODE
19#define COIN_FAST_CODE
20#endif
21
26
27public:
34 int numberRows, const CoinFactorizationDouble *pivotRegion,
35 const int *permuteBack, const int *startColumn,
36 const int *numberInColumn,
37 const int *indexRow, const CoinFactorizationDouble *element);
40
46
57 int factorize(const ClpMatrixBase *matrix,
58 int rowIsBasic[], int columnIsBasic[]);
60
63
67 int replaceColumn(CoinIndexedVector *column,
68 int pivotRow);
70
77 double updateColumn(CoinIndexedVector *regionSparse,
78 CoinIndexedVector *regionSparse2,
79 int pivotRow);
85 int updateColumn(CoinIndexedVector *regionSparse,
86 double array[]) const;
93 int updateColumnTranspose(CoinIndexedVector *regionSparse,
94 double array[]) const;
96 int updateColumnTranspose(CoinIndexedVector *regionSparse,
97 CoinIndexedVector *regionSparse2) const;
99
100private:
101 // checks looks okay
102 void check();
103 // prints data
104 void print();
107#ifndef COIN_FAST_CODE
109 double slackValue_;
110#endif
122 int *pivot_;
128 double *sign_;
130 int *stack_;
138 int *depth_;
140 char *mark_;
142};
143#endif
144
145/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
146*/
Abstract base class for Clp Matrices.
This deals with Factorization and Updates for network structures.
double * sign_
Sign of pivot.
double updateColumn(CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2, int pivotRow)
Updates one column (FTRAN) from region, Returns pivot value if "pivotRow" >=0.
int * permuteBack_
Permute back array.
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=(const ClpNetworkBasis &other)
= copy
int * permute_
Permute into array.
~ClpNetworkBasis()
Destructor.
int numberColumns_
Number of Columns in factorization.
int * pivot_
Pivot row.
int * leftSibling_
Left sibling.
int updateColumn(CoinIndexedVector *regionSparse, double array[]) const
Updates one column (FTRAN) to/from array For large problems you should ALWAYS know where the nonzeros...
int * parent_
Parent for each column.
ClpNetworkBasis()
Default constructor.
int factorize(const ClpMatrixBase *matrix, int rowIsBasic[], int columnIsBasic[])
When part of LP - given by basic variables.
const ClpSimplex * model_
model
int updateColumnTranspose(CoinIndexedVector *regionSparse, CoinIndexedVector *regionSparse2) const
Updates one column (BTRAN) from region2.
int * stack2_
Second stack.
int replaceColumn(CoinIndexedVector *column, int pivotRow)
Replaces one Column to basis, returns 0=OK, 1=Probably OK, 2=singular!!
char * mark_
To mark rows.
int * descendant_
Descendant.
int numberRows_
Number of Rows in factorization.
ClpNetworkBasis(const ClpNetworkBasis &other)
Copy constructor.
int * rightSibling_
Right sibling.
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.
This solves LPs using the simplex method.