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));
90 void setData(
int s,
const int *ind,
const double *val) {
98 memcpy(
indices_, ind,
sizeof(
int) * s);
99 memcpy(
values_, val,
sizeof(
double) * s);
147 throw CoinError(
"Failed to decode Bcps part of var",
155 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.
virtual AlpsKnowledge * decode(AlpsEncoded &encoded) const
Decode a variable from an encoded object.
BlisVariable(double lbh, double ubh, double lbs, double ubs)
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)
int getSize() const
Return data.