24 #ifndef BlisVariable_h_
25 #define BlisVariable_h_
50 memcpy(
indices_, ind, s *
sizeof(
int));
51 memcpy(
values_, val, s *
sizeof(
double));
62 double obj,
int s,
const int *ind,
const double *val)
70 memcpy(
indices_, ind, s *
sizeof(
int));
71 memcpy(
values_, val, s *
sizeof(
double));
89 void setData(
int s,
const int *ind,
const double *val) {
97 memcpy(
indices_, ind,
sizeof(
int) * s);
98 memcpy(
values_, val,
sizeof(
double) * s);
152 throw CoinError(
"Failed to decode Bcps part of var",
160 throw CoinError(
"Failed to decode Blis part of var",
BlisVariable(double lbh, double ubh, double lbs, double ubs, double obj, int s, const int *ind, const double *val)
AlpsEncoded & readRep(T &value)
Read a single object of type T from repsentation_ .
AlpsEncoded & writeRep(const T &value)
Write a single object of type T in repsentation_ .
AlpsReturnStatus decodeBlis(AlpsEncoded &encoded)
Unpack Blis part from a encode object.
double * getValues()
Return data.
int * getIndices() const
Return data.
This data structure is to contain the packed form of an encodable knowledge.
double getObjCoef()
Return data.
virtual AlpsKnowledge * decode(AlpsEncoded &encoded) const
Decode a variable from an encoded object.
BlisVariable(double lbh, double ubh, double lbs, double ubs)
void setObjCoef(double coef)
Set data.
AlpsReturnStatus encodeBlis(AlpsEncoded *encoded)
Pack Blis part into an encoded object.
AlpsReturnStatus encodeBcpsObject(AlpsEncoded *encoded) const
Pack Bcps part to a encode object.
void setData(int s, const int *ind, const double *val)
Set data.
The abstract base class of any user-defined class that Alps has to know about in order to encode/deco...
Error Class thrown by an exception.
virtual AlpsReturnStatus encode(AlpsEncoded *encoded)
Pack to a encode object.
AlpsReturnStatus decodeBcpsObject(AlpsEncoded &encoded)
Unpack Bcps part from a encode object.
BlisVariable(double obj, int s, const int *ind, const double *val)
virtual AlpsEncoded * encode() const
This method should encode the content of the object and return a pointer to the encoded form...
int getSize() const
Return data.