Exemple #1
0
void
BCP_lp_relax::pack(BCP_buffer& buf) const {
   const int major = getMajorDim();
   const int minor = getMinorDim();
   buf.pack(colOrdered_)
      .pack(extraGap_)
      .pack(extraMajor_)
      .pack(major)
      .pack(minor)
      .pack(size_)
      .pack(maxMajorDim_)
      .pack(maxSize_);

   const int * length = getVectorLengths();
   const int * start = getVectorStarts();
   const int * ind = getIndices();
   const double * elem = getElements();
   if (major > 0) {
     buf.pack(length, major);
     buf.pack(start, major+1);
     for (int i = 0; i < major; ++i)
       buf.pack(ind + start[i], length[i]);
     for (int i = 0; i < major; ++i)
       buf.pack(elem + start[i], length[i]);
   }

   buf.pack(_Objective).pack(_ColLowerBound).pack(_ColUpperBound)
      .pack(_RowLowerBound).pack(_RowUpperBound);
}
Exemple #2
0
/* The length of a major-dimension vector. */
int
ClpMatrixBase::getVectorLength(int index) const
{
     return getVectorLengths()[index];
}