Zoltan2
Public Member Functions | List of all members
Zoltan2::coordinateModelPartBox< scalar_t, part_t > Class Template Reference

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

#include <Zoltan2_CoordinatePartitioningGraph.hpp>

Public Member Functions

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

Detailed Description

template<typename scalar_t, typename part_t>
class Zoltan2::coordinateModelPartBox< scalar_t, part_t >

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

Definition at line 70 of file Zoltan2_CoordinatePartitioningGraph.hpp.

Constructor & Destructor Documentation

◆ coordinateModelPartBox() [1/3]

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

Constructor.

Definition at line 93 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ coordinateModelPartBox() [2/3]

template<typename scalar_t, typename part_t>
Zoltan2::coordinateModelPartBox< scalar_t, part_t >::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 117 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ coordinateModelPartBox() [3/3]

template<typename scalar_t, typename part_t>
Zoltan2::coordinateModelPartBox< scalar_t, part_t >::coordinateModelPartBox ( const coordinateModelPartBox< scalar_t, part_t > &  other)
inline

Copy Constructor deep copy of the maximum and minimum boundaries.

Definition at line 142 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ ~coordinateModelPartBox()

template<typename scalar_t, typename part_t>
Zoltan2::coordinateModelPartBox< scalar_t, part_t >::~coordinateModelPartBox ( )
inline

Destructor.

Definition at line 167 of file Zoltan2_CoordinatePartitioningGraph.hpp.

Member Function Documentation

◆ setpId()

template<typename scalar_t, typename part_t>
void Zoltan2::coordinateModelPartBox< scalar_t, part_t >::setpId ( part_t  pid)
inline

function to set the part id

Definition at line 177 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ getpId()

template<typename scalar_t, typename part_t>
part_t Zoltan2::coordinateModelPartBox< scalar_t, part_t >::getpId ( ) const
inline

function to get the part id

Definition at line 182 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ getDim()

template<typename scalar_t, typename part_t>
int Zoltan2::coordinateModelPartBox< scalar_t, part_t >::getDim ( ) const
inline

function to set the dimension

Definition at line 189 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ getlmins()

template<typename scalar_t, typename part_t>
scalar_t* Zoltan2::coordinateModelPartBox< scalar_t, part_t >::getlmins ( ) const
inline

function to get minimum values along all dimensions

Definition at line 194 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ getlmaxs()

template<typename scalar_t, typename part_t>
scalar_t* Zoltan2::coordinateModelPartBox< scalar_t, part_t >::getlmaxs ( ) const
inline

function to get maximum values along all dimensions

Definition at line 199 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ computeCentroid()

template<typename scalar_t, typename part_t>
void Zoltan2::coordinateModelPartBox< scalar_t, part_t >::computeCentroid ( scalar_t *  centroid) const
inline

compute the centroid of the box

Definition at line 204 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ getGridIndices()

template<typename scalar_t, typename part_t>
std::vector<part_t>* Zoltan2::coordinateModelPartBox< scalar_t, part_t >::getGridIndices ( )
inline

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

Definition at line 212 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ getNeighbors()

template<typename scalar_t, typename part_t>
std::set<part_t>* Zoltan2::coordinateModelPartBox< scalar_t, part_t >::getNeighbors ( )
inline

function to get the indices of the neighboring parts.

Definition at line 218 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ pointInBox()

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

function to test whether a point is in the box

Definition at line 224 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ boxesOverlap()

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

function to test whether this box overlaps a given box

Definition at line 236 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ isNeighborWith()

template<typename scalar_t, typename part_t>
bool Zoltan2::coordinateModelPartBox< scalar_t, part_t >::isNeighborWith ( const coordinateModelPartBox< scalar_t, part_t > &  other) const
inline

function to check if two boxes are neighbors.

Definition at line 258 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ addNeighbor()

template<typename scalar_t, typename part_t>
void Zoltan2::coordinateModelPartBox< scalar_t, part_t >::addNeighbor ( part_t  nIndex)
inline

function to add a new neighbor to the neighbor list.

Definition at line 292 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ isAlreadyNeighbor()

template<typename scalar_t, typename part_t>
bool Zoltan2::coordinateModelPartBox< scalar_t, part_t >::isAlreadyNeighbor ( part_t  nIndex)
inline

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

Definition at line 297 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ setMinMaxHashIndices()

template<typename scalar_t, typename part_t>
void Zoltan2::coordinateModelPartBox< scalar_t, part_t >::setMinMaxHashIndices ( scalar_t *  minMaxBoundaries,
scalar_t *  sliceSizes,
part_t  numSlicePerDim 
)
inline

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

Definition at line 309 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ print()

template<typename scalar_t, typename part_t>
void Zoltan2::coordinateModelPartBox< scalar_t, part_t >::print ( )
inline

function to print the boundaries.

Definition at line 374 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ updateMinMax()

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

function to update the boundary of the box.

Definition at line 382 of file Zoltan2_CoordinatePartitioningGraph.hpp.

◆ writeGnuPlot()

template<typename scalar_t, typename part_t>
void Zoltan2::coordinateModelPartBox< scalar_t, part_t >::writeGnuPlot ( std::ofstream &  file,
std::ofstream &  mm 
)
inline

function for visualization.

Definition at line 393 of file Zoltan2_CoordinatePartitioningGraph.hpp.


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