7 _dimension ( dimension )
14 _dimension ( lowCorner.size() )
22 _dimension ( cuboid.getDimension() )
31 _dimension ( cuboid1.getDimension() )
53 int ncoords = coords.
size();
54 for (
int i = 0; i < ncoords; i++){
55 if (
inVolume(coords.
at(i)) ==
false )
return false;
66 ERROR_LOG <<
"You are trying to add HyperVolumes of different dimensions.";
70 for(
int i = 0; i <
size(); i++){
73 for(
int i = 0; i < other.
size(); i++){
100 else ERROR_LOG <<
"The HyperCuboid you are adding to this HyperVolume has the wrong dimension";
123 binCenter = binCenter + ithBinCenter*weight;
127 binCenter = binCenter/sumW;
151 double min =
_hyperCuboids.at(0).getLowCorner().at(dimension);
153 double temp =
_hyperCuboids.at(i).getLowCorner().at(dimension);
154 if (min > temp) min = temp;
159 ERROR_LOG <<
"You are requesting a dimensionality that does not exist in this HyperVolume";
169 double max =
_hyperCuboids.at(0).getHighCorner().at(dimension);
171 double temp =
_hyperCuboids.at(i).getHighCorner().at(dimension);
172 if (max < temp) max = temp;
177 ERROR_LOG <<
"You are requesting a dimensionality that does not exist in this HyperVolume";
201 if (endline == 1) os << std::endl;
213 int sliceDim = (int)dims.size();
214 int newDim = currentDim - sliceDim;
237 for (
int i = 0; i <
size(); i++){
238 at(i).
split(dimension, fractionalSplitPoint, hyperCuboidSet);
241 return hyperCuboidSet;
HyperVolume splitAll(int dimension, double fractionalSplitPoint)
const HyperCuboid & at(int i) const
double getMin(int dimension) const
void push_back(const HyperCuboid &hyperCuboid)
bool inVolume(const HyperPoint &coords) const
HyperCuboid getLimits() const
const int & getDimension() const
HyperVolume operator+(const HyperVolume &other) const
HyperVolume & operator=(const HyperVolume &other)
const HyperPoint & at(int i) const
const int & getDimension() const
const HyperPoint & getHighCorner() const
std::vector< HyperCuboid > _hyperCuboids
HyperVolume(int dimension)
const double & at(int i) const
const HyperPoint & getLowCorner() const
unsigned int size() const
void addHyperCuboid(const HyperPoint &lowCorner, const HyperPoint &highCorner)
HyperVolume slice(const HyperPoint &coords, std::vector< int > dims) const
const HyperCuboid & getHyperCuboid(int i) const
void print(std::ostream &os=std::cout, int endline=1) const
HyperPoint getAverageCenter() const
HyperVolume split(int dimension, double fractionalSplitPoint) const
double getMax(int dimension) const