SpatialOps
IntVec.h File Reference
#include <spatialops/structured/Numeric3Vec.h>
Include dependency graph for IntVec.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int SpatialOps::ijk_to_flat (const IntVec &dim, const IntVec &loc)
 
IntVec SpatialOps::flat_to_ijk (const IntVec &dim, const int pt)
 

Detailed Description

Date
Sep 28, 2011
Author
James C. Sutherland

Copyright (c) 2014 The University of Utah

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition in file IntVec.h.

Function Documentation

◆ flat_to_ijk()

IntVec SpatialOps::flat_to_ijk ( const IntVec dim,
const int  pt 
)
inline
Parameters
dimthe 3D layout of points
ptthe 1d (flat) index
Returns
the 3D index Assumes a fortran-style layout (e.g. first index varies fastest)

Definition at line 76 of file IntVec.h.

References SpatialOps::flat_to_ijk().

Referenced by SpatialOps::flat_to_ijk(), SpatialOps::MemoryWindow::ijk_index_from_global(), and SpatialOps::MemoryWindow::ijk_index_from_local().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ijk_to_flat()

int SpatialOps::ijk_to_flat ( const IntVec dim,
const IntVec loc 
)
inline
Parameters
dimthe 3D layout of points
locthe 3D index
Returns
the 1D (flat) index Assumes a fortran-style layout (e.g. first index varies fastest)

Definition at line 62 of file IntVec.h.

References SpatialOps::ijk_to_flat().

Referenced by SpatialOps::MemoryWindow::flat_index(), and SpatialOps::ijk_to_flat().

Here is the call graph for this function:
Here is the caller graph for this function: