119 thesolver = p_solver;
255 if( weightsAreSetup && thesolver != NULL )
260 nrows = coWeights.
dim();
262 assert(nrows == thesolver->
dim());
266 nrows = weights.
dim();
267 ncols = coWeights.
dim();
269 assert(ncols == thesolver->
dim());
270 assert(nrows == thesolver->
coDim());
281 if( !weightsAreSetup || thesolver == NULL )
287 nrows = coWeights.
dim();
289 assert(nrows == thesolver->
dim());
291 for(
int i = 0; i < nrows; ++i)
292 norms[i] = coWeights[i];
296 nrows = weights.
dim();
297 ncols = coWeights.
dim();
299 assert(ncols == thesolver->
dim());
300 assert(nrows == thesolver->
coDim());
302 for(
int i = 0; i < nrows; ++i )
303 norms[i] = weights[i];
305 for(
int i = 0; i < ncols; ++i )
306 norms[nrows + i] = coWeights[i];
316 weightsAreSetup =
false;
318 if( thesolver == NULL )
323 assert(coWeights.
dim() >= nrows);
324 for(
int i = 0; i < nrows; ++i )
325 coWeights[i] = norms[i];
326 weightsAreSetup =
true;
330 assert(weights.
dim() >= nrows);
331 assert(coWeights.
dim() >= ncols);
332 for(
int i = 0; i < nrows; ++i )
333 weights[i] = norms[i];
334 for(
int i = 0; i < ncols; ++i )
335 coWeights[i] = norms[nrows + i];
336 weightsAreSetup =
true;
350 #ifdef ENABLE_CONSISTENCY_CHECKS 351 return thesolver != 0;
368 , weightsAreSetup(false)
374 , thesolver(old.thesolver)
376 , weights(old.weights)
377 , coWeights(old.coWeights)
378 , weightsAreSetup(old.weightsAreSetup)
414 #endif // _SPXPRICER_H_ virtual void entered4(SPxId, int)
performs entering pivot.
virtual SPxId selectEnter()=0
selects Id to enter basis.
virtual void removedVecs(const int *)
vectors given by perm have been removed from loaded LP.
virtual void getNdualNorms(int &nrows, int &ncols) const
get number of available norms
Representation
LP basis representation.
virtual void setRep(SPxSolver::Representation)
sets basis representation.
SPxPricer & operator=(const SPxPricer &rhs)
assignment operator
DVector weights
vector to store pricing weights or norms
virtual bool isConsistent() const
int dim() const
dimension of basis matrix.
virtual void removedCoVec(int)
covector i was removed from loaded LP.
bool weightsAreSetup
are the weights already set up?
virtual SPxPricer * clone() const =0
clone function for polymorphism
Generic Ids for LP rows or columns.Both SPxColIds and SPxRowIds may be treated uniformly as SPxIds: ...
virtual void addedCoVecs(int)
n covectors have been added to loaded LP.
virtual bool getDualNorms(int &nrows, int &ncols, Real *norms) const
export norms from pricer
virtual void addedVecs(int)
n vectors have been added to loaded LP.
virtual void left4(int, SPxId)
performs leaving pivot.
virtual void clear()
unloads LP.
Compare class to sort idx/val pairs, used for hypersparse pricing leaving.
SPxSolver * thesolver
the solver
Abstract pricer base class.Class SPxPricer is a pure virtual class defining the interface for pricer ...
const char * m_name
name of the pricer
Generic QuickSort implementation.
virtual void removedCoVecs(const int *)
covectors given by perm have been removed from loaded LP.
Debugging, floating point type and parameter definitions.
virtual void setEpsilon(Real eps)
sets violation bound.
Sequential object-oriented SimPlex.SPxSolver is an LP solver class using the revised Simplex algorith...
virtual void load(SPxSolver *p_solver)
loads LP.
int dim() const
Dimension of vector.
Everything should be within this namespace.
virtual void setType(SPxSolver::Type)
sets pricing type.
virtual bool setDualNorms(int nrows, int ncols, Real *norms)
import norms into pricer
virtual const char * getName() const
get name of pricer.
Real theeps
violation bound
SPxPricer(const char *p_name)
constructor
virtual Real epsilon() const
returns violation bound theeps.
virtual void removedVec(int)
vector i was removed from loaded LP.
Type type() const
return current Type.
virtual SPxSolver * solver() const
returns loaded SPxSolver object.
int coDim() const
codimension.
virtual int selectLeave()=0
returns selected index to leave basis.
SPxPricer(const SPxPricer &old)
copy constructor
virtual ~SPxPricer()
destructor.
const IdxElement * elements
Representation rep() const
return the current basis representation.
columnwise representation.