Zoltan2
Loading...
Searching...
No Matches
Zoltan2::coordinateModelPartBox Class Reference

coordinateModelPartBox Class, represents the boundaries of the box which is a result of a geometric partitioning algorithm. More...

#include <Zoltan2_CoordinatePartitioningGraph.hpp>

Public Types

typedef double coord_t
typedef Zoltan2::default_part_t part_t

Public Member Functions

 coordinateModelPartBox (part_t pid, int dim_)
 Constructor.
template<typename scalar_t>
 coordinateModelPartBox (part_t pid, int dim_, scalar_t *lmi, scalar_t *lma)
 Constructor deep copy of the maximum and minimum boundaries.
 coordinateModelPartBox (const coordinateModelPartBox &other)
 Copy Constructor deep copy of the maximum and minimum boundaries.
 ~coordinateModelPartBox ()
 Destructor.
void setpId (part_t pid)
 function to set the part id
part_t getpId () const
 function to get the part id
int getDim () const
 function to set the dimension
coord_tgetlmins () const
 function to get minimum values along all dimensions
coord_tgetlmaxs () const
 function to get maximum values along all dimensions
void computeCentroid (coord_t *centroid) const
 compute the centroid of the box
std::vector< part_t > * getGridIndices ()
 function to get the indices of the buckets that the part is inserted to
std::set< part_t > * getNeighbors ()
 function to get the indices of the neighboring parts.
template<typename scalar_t>
bool pointInBox (int pointdim, scalar_t *point) const
 function to test whether a point is in the box
template<typename scalar_t>
bool boxesOverlap (int cdim, scalar_t *lower, scalar_t *upper) const
 function to test whether this box overlaps a given box
bool isNeighborWith (const coordinateModelPartBox &other) const
 function to check if two boxes are neighbors.
void addNeighbor (part_t nIndex)
 function to add a new neighbor to the neighbor list.
bool isAlreadyNeighbor (part_t nIndex)
 function to check if a given part is already in the neighbor list.
void setMinMaxHashIndices (coord_t *minMaxBoundaries, coord_t *sliceSizes, part_t numSlicePerDim)
 function to obtain the min and max hash values along all dimensions.
void print ()
 function to print the boundaries.
template<typename scalar_t>
void updateMinMax (scalar_t newBoundary, int isMax, int dimInd)
 function to update the boundary of the box.
void writeGnuPlot (std::ofstream &file, std::ofstream &mm)
 function for visualization.

Detailed Description

coordinateModelPartBox Class, represents the boundaries of the box which is a result of a geometric partitioning algorithm.

Definition at line 34 of file Zoltan2_CoordinatePartitioningGraph.hpp.

Member Typedef Documentation

◆ coord_t

◆ part_t

Constructor & Destructor Documentation

◆ coordinateModelPartBox() [1/3]

Zoltan2::coordinateModelPartBox::coordinateModelPartBox ( part_t pid,
int dim_ )
inline

Constructor.

Definition at line 42 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ coordinateModelPartBox() [2/3]

template<typename scalar_t>
Zoltan2::coordinateModelPartBox::coordinateModelPartBox ( part_t pid,
int dim_,
scalar_t * lmi,
scalar_t * lma )
inline

Constructor deep copy of the maximum and minimum boundaries.

Definition at line 67 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ coordinateModelPartBox() [3/3]

Zoltan2::coordinateModelPartBox::coordinateModelPartBox ( const coordinateModelPartBox & other)
inline

Copy Constructor deep copy of the maximum and minimum boundaries.

Definition at line 92 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ ~coordinateModelPartBox()

Zoltan2::coordinateModelPartBox::~coordinateModelPartBox ( )
inline

Destructor.

Definition at line 117 of file Zoltan2_CoordinatePartitioningGraph.hpp.

Member Function Documentation

◆ setpId()

void Zoltan2::coordinateModelPartBox::setpId ( part_t pid)
inline

function to set the part id

Definition at line 127 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ getpId()

part_t Zoltan2::coordinateModelPartBox::getpId ( ) const
inline

function to get the part id

Definition at line 132 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ getDim()

int Zoltan2::coordinateModelPartBox::getDim ( ) const
inline

function to set the dimension

Definition at line 139 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ getlmins()

coord_t * Zoltan2::coordinateModelPartBox::getlmins ( ) const
inline

function to get minimum values along all dimensions

Definition at line 144 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ getlmaxs()

coord_t * Zoltan2::coordinateModelPartBox::getlmaxs ( ) const
inline

function to get maximum values along all dimensions

Definition at line 149 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ computeCentroid()

void Zoltan2::coordinateModelPartBox::computeCentroid ( coord_t * centroid) const
inline

compute the centroid of the box

Definition at line 154 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ getGridIndices()

std::vector< part_t > * Zoltan2::coordinateModelPartBox::getGridIndices ( )
inline

function to get the indices of the buckets that the part is inserted to

Definition at line 162 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ getNeighbors()

std::set< part_t > * Zoltan2::coordinateModelPartBox::getNeighbors ( )
inline

function to get the indices of the neighboring parts.

Definition at line 168 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ pointInBox()

template<typename scalar_t>
bool Zoltan2::coordinateModelPartBox::pointInBox ( int pointdim,
scalar_t * point ) const
inline

function to test whether a point is in the box

Definition at line 175 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ boxesOverlap()

template<typename scalar_t>
bool Zoltan2::coordinateModelPartBox::boxesOverlap ( int cdim,
scalar_t * lower,
scalar_t * upper ) const
inline

function to test whether this box overlaps a given box

Definition at line 188 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ isNeighborWith()

bool Zoltan2::coordinateModelPartBox::isNeighborWith ( const coordinateModelPartBox & other) const
inline

function to check if two boxes are neighbors.

Definition at line 213 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ addNeighbor()

void Zoltan2::coordinateModelPartBox::addNeighbor ( part_t nIndex)
inline

function to add a new neighbor to the neighbor list.

Definition at line 246 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ isAlreadyNeighbor()

bool Zoltan2::coordinateModelPartBox::isAlreadyNeighbor ( part_t nIndex)
inline

function to check if a given part is already in the neighbor list.

Definition at line 251 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ setMinMaxHashIndices()

void Zoltan2::coordinateModelPartBox::setMinMaxHashIndices ( coord_t * minMaxBoundaries,
coord_t * sliceSizes,
part_t numSlicePerDim )
inline

function to obtain the min and max hash values along all dimensions.

Definition at line 263 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ print()

void Zoltan2::coordinateModelPartBox::print ( )
inline

function to print the boundaries.

Definition at line 328 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ updateMinMax()

template<typename scalar_t>
void Zoltan2::coordinateModelPartBox::updateMinMax ( scalar_t newBoundary,
int isMax,
int dimInd )
inline

function to update the boundary of the box.

Definition at line 337 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ writeGnuPlot()

void Zoltan2::coordinateModelPartBox::writeGnuPlot ( std::ofstream & file,
std::ofstream & mm )
inline

function for visualization.

Definition at line 348 of file Zoltan2_CoordinatePartitioningGraph.hpp.


The documentation for this class was generated from the following file: