STORMM Source Documentation
Loading...
Searching...
No Matches
stormm::stmath::HilbertSFC Class Reference

Draw a Hilbert space-filling curve. More...

#include <hilbert_sfc.h>

Public Member Functions

 HilbertSFC (int x_span_in, int y_span_in, int z_span_in, HilbertCurveMode method=HilbertCurveMode::OVERSPAN)
 The constructor takes as inputs a trio of integers indicating the overall unitless dimensions of the grid into which to inscribe the space-filling curve, as well as a choice of methods for spanning the region of space.
 
int3 getDimensions () const
 Get the dimensions of the region filled by the curve.
 
int getCurveIndex (int grid_x, int grid_y, int grid_z) const
 Get the curve index to which a particular grid element corresponds. The grid begins at (0, 0, 0). This function returns an error if the grid element is outside the curve's valid region.
 
const std::vector< int3 > & getCurve () const
 Get the Hilbert space filling curve, expressed in unitless integers with components for each Cartesian dimension.
 
int getDimension (CartesianDimension dim) const
 Get the dimension of the region filled by the curve along one axis.
 
int getDimension (UnitCellAxis dim) const
 

Detailed Description

Draw a Hilbert space-filling curve.

Member Function Documentation

◆ getCurveIndex()

int stormm::stmath::HilbertSFC::getCurveIndex ( int grid_x,
int grid_y,
int grid_z ) const

Get the curve index to which a particular grid element corresponds. The grid begins at (0, 0, 0). This function returns an error if the grid element is outside the curve's valid region.

Parameters
grid_xUnitless X position on the region filled by the curve
grid_yUnitless Y position on the region filled by the curve
grid_zUnitless Z position on the region filled by the curve

◆ getDimension()

int stormm::stmath::HilbertSFC::getDimension ( CartesianDimension dim) const

Get the dimension of the region filled by the curve along one axis.

Overloaded:

  • Provide the Cartesian axis
  • Provide the unit cell axis
Parameters
dimThe dimension of interest

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