A general cubical cell with additional information about the layer number. More...
#include <twolayer.h>
Public Types | |
enum | OutputBitValues { BitProduct = 0x01, BitSpace = 0x02 } |
How to output the cell: As a cartesian product or by two opposite vertices? Also, should ' ' be inserted? More... | |
typedef theLayerType | LayerType |
The type for keeping the layer number. | |
typedef tCell | CellType |
The type for keeping the cell at the given layer. | |
typedef tCell::CoordType | CoordType |
The type of the coordinates. | |
typedef tCell::PointBase | PointBase |
The point base (for wrapping and tabulating coordinates). | |
Public Member Functions | |
tCell2l () | |
The default constructor. | |
tCell2l (const tCell &_q, const LayerType &_l) | |
The constructor of a cell at a given layer. | |
tCell2l (const CoordType *c1, const CoordType *c2, int spcdim, int celldim=-1, int layer=0) | |
The constructor of a cell spanning from one point to another. | |
template<class tCube > | |
tCell2l (const tCube2l< tCube > &q1, const tCube2l< tCube > &q2) | |
The constructor of a cell as an intersection of two cubes. | |
template<class tCube > | |
tCell2l (const tCube2l< tCube > &c, int facedim) | |
The constructor of an arbitrary k-dimensional face of a full cube. | |
template<class tCube > | |
tCell2l (const tCube2l< tCube > &c) | |
The constructor of a full-dimensional cubical cell. | |
template<class tCellSrc > | |
tCell2l (const tCell2l< tCellSrc > &q, int offset, int ncoords) | |
The constructor of a projection of a cell to the given number of coordinates that start at the given offset. | |
tCell2l (const tCell2l &c) | |
The copy constructor. | |
tCell2l & | operator= (const tCell2l &c) |
The assignment operator. | |
int | dim () const |
Returns the dimension of the cubical cell. | |
int | spacedim () const |
Returns the dimension of the embedding space. | |
template<class intType > | |
intType * | leftcoord (intType *c) const |
Fills the given table with the left corner coordinates. | |
template<class intType > | |
intType * | rightcoord (intType *c) const |
Fills the given table with the right corner coordinates. | |
int_t | hashkey1 () const |
Returns the hash key no. 1 required by the hashing set template. | |
int_t | hashkey2 () const |
Returns the hash key no. 2 required by the hashing set template. | |
const LayerType & | layer () const |
Returns the layer number. | |
const tCell & | cell () const |
Returns the cell without the layer. | |
void | layer (const typename tCell2l< tCell >::LayerType &newlayer) |
Sets the layer number. | |
template<class tCell > | |
tCell2l (const typename tCell2l< tCell >::CoordType *c1, const typename tCell2l< tCell >::CoordType *c2, int spcdim, int celldim, int layer) | |
Static Public Member Functions | |
static const char * | name () |
Returns the name of the objects represented by this class. | |
static const char * | pluralname () |
Returns the plural name of the objects represented by this class. | |
static void | identify (const hashedset< tCell > &s, int dim) |
Sets the given set of cells for the identification of layers. | |
static const hashedset< tCell > & | identify () |
Returns the set of cells for the identification of layers. | |
static LayerType | droplayer (const tCell &q, const LayerType &layer) |
Drops the layer of the cell if necessary by the identification. | |
Static Public Attributes | |
static const int | MaxDim = tCell::MaxDim |
The maximal dimension of a cube. | |
static int | OutputBits = 0 |
Private Attributes | |
tCell | q |
The actual cubical cell at the given layer. | |
LayerType | l |
The layer to which the cell belongs. | |
Static Private Attributes | |
static hashedset< tCell > | idset |
The set of cells at which the identification takes place. | |
static int | iddim |
The space dimension of cells for which the identification takes place. |
A general cubical cell with additional information about the layer number.
By default, the layer number is zero, unless set otherwise.
Definition at line 471 of file twolayer.h.
typedef tCell chomp::homology::tCell2l< tCell >::CellType |
The type for keeping the cell at the given layer.
Definition at line 478 of file twolayer.h.
typedef tCell::CoordType chomp::homology::tCell2l< tCell >::CoordType |
The type of the coordinates.
Definition at line 481 of file twolayer.h.
typedef theLayerType chomp::homology::tCell2l< tCell >::LayerType |
The type for keeping the layer number.
Definition at line 475 of file twolayer.h.
typedef tCell::PointBase chomp::homology::tCell2l< tCell >::PointBase |
The point base (for wrapping and tabulating coordinates).
Definition at line 487 of file twolayer.h.
enum chomp::homology::tCell2l::OutputBitValues |
How to output the cell: As a cartesian product or by two opposite vertices? Also, should ' ' be inserted?
Definition at line 552 of file twolayer.h.
{ BitProduct = 0x01, // unset => two vertices BitSpace = 0x02 };
chomp::homology::tCell2l< tCell >::tCell2l | ( | ) | [inline] |
The default constructor.
Definition at line 608 of file twolayer.h.
chomp::homology::tCell2l< tCell >::tCell2l | ( | const tCell & | _q, | |
const LayerType & | _l | |||
) | [inline] |
The constructor of a cell at a given layer.
Definition at line 614 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::idset, chomp::homology::tCell2l< tCell >::l, and chomp::homology::tCell2l< tCell >::q.
chomp::homology::tCell2l< tCell >::tCell2l | ( | const CoordType * | c1, | |
const CoordType * | c2, | |||
int | spcdim, | |||
int | celldim = -1 , |
|||
int | layer = 0 | |||
) |
The constructor of a cell spanning from one point to another.
chomp::homology::tCell2l< tCell >::tCell2l | ( | const tCube2l< tCube > & | q1, | |
const tCube2l< tCube > & | q2 | |||
) | [inline] |
The constructor of a cell as an intersection of two cubes.
Definition at line 635 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::idset, chomp::homology::tCell2l< tCell >::l, and chomp::homology::tCell2l< tCell >::q.
chomp::homology::tCell2l< tCell >::tCell2l | ( | const tCube2l< tCube > & | c, | |
int | facedim | |||
) | [inline] |
The constructor of an arbitrary k-dimensional face of a full cube.
Definition at line 647 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::droplayer(), chomp::homology::tCell2l< tCell >::l, and chomp::homology::tCell2l< tCell >::q.
chomp::homology::tCell2l< tCell >::tCell2l | ( | const tCube2l< tCube > & | c | ) | [inline, explicit] |
The constructor of a full-dimensional cubical cell.
Definition at line 656 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::idset, chomp::homology::tCell2l< tCell >::l, and chomp::homology::tCell2l< tCell >::q.
chomp::homology::tCell2l< tCell >::tCell2l | ( | const tCell2l< tCellSrc > & | q, | |
int | offset, | |||
int | ncoords | |||
) | [inline] |
The constructor of a projection of a cell to the given number of coordinates that start at the given offset.
Definition at line 666 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::idset, chomp::homology::tCell2l< tCell >::l, and chomp::homology::tCell2l< tCell >::q.
chomp::homology::tCell2l< tCell >::tCell2l | ( | const tCell2l< tCell > & | c | ) | [inline] |
chomp::homology::tCell2l< tCell >::tCell2l | ( | const typename tCell2l< tCell >::CoordType * | c1, | |
const typename tCell2l< tCell >::CoordType * | c2, | |||
int | spcdim, | |||
int | celldim, | |||
int | layer | |||
) | [inline] |
Definition at line 623 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::idset, chomp::homology::tCell2l< tCell >::l, and chomp::homology::tCell2l< tCell >::q.
const tCell & chomp::homology::tCell2l< tCell >::cell | ( | ) | const [inline] |
Returns the cell without the layer.
Definition at line 754 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::q.
{ return q; } /* cell */
int chomp::homology::tCell2l< tCell >::dim | ( | ) | const [inline] |
Returns the dimension of the cubical cell.
Definition at line 697 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::q.
tCell2l< tCell >::LayerType chomp::homology::tCell2l< tCell >::droplayer | ( | const tCell & | q, | |
const LayerType & | layer | |||
) | [inline, static] |
Drops the layer of the cell if necessary by the identification.
Definition at line 783 of file twolayer.h.
Referenced by chomp::homology::tCell2l< tCell >::tCell2l().
{ if (!layer) return layer; int dim = q. spacedim (); if (dim <= iddim) { if (idset. check (q)) return 0; else return layer; } if (dim != iddim + iddim) throw "Unknown cells for layer analysis."; typename tCell2l<tCell>::LayerType layer1 (layer >> 2); typename tCell2l<tCell>::LayerType layer2 (layer & 0x03); if ((layer1) && idset. check (tCell (q, 0, iddim))) layer1 = 0; if ((layer2) && idset. check (tCell (q, iddim, iddim))) layer2 = 0; return (layer1 << 2) | layer2; } /* droplayer */
int_t chomp::homology::tCell2l< tCell >::hashkey1 | ( | ) | const [inline] |
Returns the hash key no. 1 required by the hashing set template.
Definition at line 723 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::q.
int_t chomp::homology::tCell2l< tCell >::hashkey2 | ( | ) | const [inline] |
Returns the hash key no. 2 required by the hashing set template.
Definition at line 729 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::l, and chomp::homology::tCell2l< tCell >::q.
void chomp::homology::tCell2l< tCell >::identify | ( | const hashedset< tCell > & | s, | |
int | dim | |||
) | [inline, static] |
Sets the given set of cells for the identification of layers.
Definition at line 768 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::iddim, and chomp::homology::tCell2l< tCell >::idset.
const hashedset< tCell > & chomp::homology::tCell2l< tCell >::identify | ( | ) | [inline, static] |
Returns the set of cells for the identification of layers.
Definition at line 776 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::idset.
Referenced by chomp::homology::createimages(), chomp::homology::intersection2l(), and chomp::homology::tCube2l< tCube >::setlayers().
{ return idset; } /* identify */
const tCell2l< tCell >::LayerType & chomp::homology::tCell2l< tCell >::layer | ( | ) | const [inline] |
Returns the layer number.
Definition at line 747 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::l.
{ return l; } /* layer */
void chomp::homology::tCell2l< tCell >::layer | ( | const typename tCell2l< tCell >::LayerType & | newlayer | ) | [inline] |
Sets the layer number.
Definition at line 761 of file twolayer.h.
{ l = newlayer; return; } /* layer */
intType * chomp::homology::tCell2l< tCell >::leftcoord | ( | intType * | c | ) | const [inline] |
Fills the given table with the left corner coordinates.
Definition at line 710 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::q.
const char * chomp::homology::tCell2l< tCell >::name | ( | ) | [inline, static] |
Returns the name of the objects represented by this class.
Definition at line 735 of file twolayer.h.
{ return tCell::name (); } /* name */
tCell2l< tCell > & chomp::homology::tCell2l< tCell >::operator= | ( | const tCell2l< tCell > & | c | ) | [inline] |
The assignment operator.
Definition at line 689 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::l, and chomp::homology::tCell2l< tCell >::q.
const char * chomp::homology::tCell2l< tCell >::pluralname | ( | ) | [inline, static] |
Returns the plural name of the objects represented by this class.
Definition at line 741 of file twolayer.h.
{ return tCell::pluralname (); } /* pluralname */
intType * chomp::homology::tCell2l< tCell >::rightcoord | ( | intType * | c | ) | const [inline] |
Fills the given table with the right corner coordinates.
Definition at line 717 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::q.
{ return q. rightcoord (c); } /* rightcoord */
int chomp::homology::tCell2l< tCell >::spacedim | ( | ) | const [inline] |
Returns the dimension of the embedding space.
Definition at line 703 of file twolayer.h.
References chomp::homology::tCell2l< tCell >::q.
int chomp::homology::tCell2l< tCell >::iddim [static, private] |
The space dimension of cells for which the identification takes place.
For twice this dimension, the cells are identified by considering both projections.
Definition at line 584 of file twolayer.h.
Referenced by chomp::homology::tCell2l< tCell >::identify().
hashedset< tCell > chomp::homology::tCell2l< tCell >::idset [static, private] |
The set of cells at which the identification takes place.
Definition at line 579 of file twolayer.h.
Referenced by chomp::homology::tCell2l< tCell >::identify(), and chomp::homology::tCell2l< tCell >::tCell2l().
LayerType chomp::homology::tCell2l< tCell >::l [private] |
The layer to which the cell belongs.
Definition at line 590 of file twolayer.h.
Referenced by chomp::homology::tCell2l< tCell >::hashkey2(), chomp::homology::tCell2l< tCell >::layer(), chomp::homology::tCell2l< tCell >::operator=(), and chomp::homology::tCell2l< tCell >::tCell2l().
const int chomp::homology::tCell2l< tCell >::MaxDim = tCell::MaxDim [static] |
The maximal dimension of a cube.
Definition at line 484 of file twolayer.h.
int chomp::homology::tCell2l< tCell >::OutputBits = 0 [static] |
Definition at line 557 of file twolayer.h.
tCell chomp::homology::tCell2l< tCell >::q [private] |
The actual cubical cell at the given layer.
Definition at line 587 of file twolayer.h.
Referenced by chomp::homology::tCell2l< tCell >::cell(), chomp::homology::tCell2l< tCell >::dim(), chomp::homology::tCell2l< tCell >::hashkey1(), chomp::homology::tCell2l< tCell >::hashkey2(), chomp::homology::tCell2l< tCell >::leftcoord(), chomp::homology::tCell2l< tCell >::operator=(), chomp::homology::tCell2l< tCell >::rightcoord(), chomp::homology::tCell2l< tCell >::spacedim(), and chomp::homology::tCell2l< tCell >::tCell2l().