21 #ifdef _MSC_VER // Microsoft Visual C++ -- warning level 4 22 #pragma warning( disable : 4996) // function was declared deprecated(strcpy, localtime, etc.) 89 append(coordinatesCount, c);
124 append(coordinatesCount, c);
165 throw QhullError(10062,
"Qhull error: can not set PointCoordinates dimension to %d", i);
168 if(currentDimension!=0 && i!=currentDimension){
169 throw QhullError(10063,
"Qhull error: can not change PointCoordinates dimension (from %d to %d)", currentDimension, i);
193 if(coordinatesCount<=0){
221 if(
c==
'-' || isdigit(
c)){
222 throw QhullError(10028,
"Qhull argument error: comments can not start with a number or minus, %s", 0, 0, 0.0, s.c_str());
235 in >> ws >> inDimension >> ws;
239 getline(in, remainder);
240 throw QhullError(10005,
"Qhull error: input did not start with dimension or count -- %s", 0, 0, 0, remainder.c_str());
242 char c= (char)in.peek();
243 if(c!=
'-' && !isdigit(c)){
251 getline(in, remainder);
252 throw QhullError(10009,
"Qhull error: input did not start with dimension and count -- %d %s", inDimension, 0, 0, remainder.c_str());
255 if(c!=
'-' && !isdigit(c)){
259 if(inCount<inDimension){
260 std::swap(inCount, inDimension);
264 countT coordinatesCount= 0;
271 getline(in, remainder);
272 throw QhullError(10008,
"Qhull error: failed to read coordinate %d of point %d\n %s", coordinatesCount % inDimension, coordinatesCount/inDimension, 0, remainder.c_str());
278 if(coordinatesCount != inCount*inDimension){
279 if(coordinatesCount%inDimension==0){
280 throw QhullError(10006,
"Qhull error: expected %d %d-d PointCoordinates but read %i PointCoordinates",
int(inCount), inDimension, 0.0,
int(coordinatesCount/inDimension));
282 throw QhullError(10012,
"Qhull error: expected %d %d-d PointCoordinates but read %i PointCoordinates plus %f extra coordinates", inCount, inDimension,
float(coordinatesCount%inDimension), coordinatesCount/inDimension);
310 if(i<0 || n>coordinatesCount){
311 throw QhullError(10061,
"Qhull error: point_coordinates is too short (%d) for point %d", coordinatesCount, i);
334 os << dimension << endl;
336 os << dimension <<
" " << comment << endl;
PointCoordinates & operator=(const PointCoordinates &other)
QhullRidge – Qhull's ridge structure, ridgeT, as a C++ class.
Coordinates::ConstIterator beginCoordinates() const
See QhullPoints for begin, constBegin, end.
POD type equivalent to qhT. No virtual members.
void appendPoints(std::istream &in)
void reserveCoordinates(countT newCoordinates)
QhullPoints & operator=(const QhullPoints &other)
void appendComment(const std::string &s)
Interface to Qhull from C++.
std::string describe_points
countT indexOf(const coordT *pointCoordinates) const
PointCoordinates operator+(const PointCoordinates &other) const
void checkValid() const
See QhullPoints for coordinates, coordinateCount, dimension, empty, isEmpty, ==, !=.
void append(const std::vector< coordT > &otherCoordinates)
QhullPoints coordinates, constData, data, count, size.
countT coordinateCount() const
const coordT * data() const
int indexOffset(int i) const
Coordinates point_coordinates
bool includesCoordinates(const coordT *c) const
const_iterator ConstIterator
void push_back(const coordT &c)
PointCoordinates & operator<<(const PointCoordinates &other)
std::string comment() const
const Coordinates & getCoordinates() const
const coordT * coordinates() const
0 if undefined