9 #include "functionObjects.h"
10 #include "QhullError.h"
11 #include "Coordinates.h"
29 Coordinates Coordinates::
30 mid(countT idx, countT
length)
const
33 if(length<0 || idx+length >
count()){
34 newLength=
count()-idx;
38 std::copy(begin()+idx, begin()+(idx+newLength), std::back_inserter(result));
44 value(countT idx,
const coordT &defaultValue)
const
46 return ((idx < 0 || idx >=
count()) ? defaultValue : (*
this)[idx]);
54 Coordinates result(*
this);
55 std::copy(other.begin(), other.end(), std::back_inserter(result));
59 Coordinates & Coordinates::
60 operator+=(
const Coordinates &other)
63 Coordinates
clone(other);
64 std::copy(
clone.begin(),
clone.end(), std::back_inserter(*
this));
66 std::copy(other.begin(), other.end(), std::back_inserter(*
this));
74 append(
int pointDimension, coordT *c)
78 for(
int i= 0; i<pointDimension; ++i){
79 coordinate_array.push_back(*p++);
101 swap(countT idx, countT other)
113 CoordinatesIterator i(*
this);
114 return i.findNext(t);
118 count(
const coordT &t)
const
120 CoordinatesIterator i(*
this);
122 while(i.findNext(t)){
129 indexOf(
const coordT &t, countT from)
const
138 const_iterator i= begin()+from;
139 while(i!=constEnd()){
141 return (
static_cast<countT
>(i-begin()));
150 lastIndexOf(
const coordT &t, countT from)
const
154 }
else if(from>=
count()){
158 const_iterator i= begin()+from+1;
159 while(i-- != constBegin()){
161 return (
static_cast<countT
>(i-begin()));
169 removeAll(
const coordT &t)
171 MutableCoordinatesIterator i(*
this);
172 while(i.findNext(t)){
186 using orgQhull::Coordinates;
189 operator<<(ostream &os,
const Coordinates &cs)
191 Coordinates::const_iterator c= cs.begin();
192 for(countT i=cs.count(); i--; ){
ostream & operator<<(ostream &os, const Coordinates &cs)
Coordinate operator+(const Coordinate &LHS, const Coordinate &RHS)
void swap(ConfigDoF &A, ConfigDoF &B)
bool contains(const Container &container, const T &value)
Equivalent to container.end() != std::find(container.begin(), container.end(), value)
double length(const Eigen::MatrixBase< Derived > &value)
std::unique_ptr< T > clone(const T &obj)
QhullRidge – Qhull's ridge structure, ridgeT, as a C++ class.