The Original CHomP Software
Public Member Functions | Private Attributes | List of all members
chomp::homology::Neighbors< cubetype, settype > Class Template Reference

The neighborhood of a cube in a set of cubes. More...

#include <bddacycl.h>

Public Member Functions

 Neighbors (const cubetype &middle, const settype &cset, BitField &bfield)
 The default constructor. More...
 
bool check (int n) const
 The procedure for checking whether the given neighbor exists. More...
 

Private Attributes

const cubetype & q
 The cube whose neighbors are verified. More...
 
const settype & s
 The set of cubes in which the neighbors of the cube are sought. More...
 
BitFieldb
 The bitfield to record each neighbor in. More...
 

Detailed Description

template<class cubetype, class settype>
class chomp::homology::Neighbors< cubetype, settype >

The neighborhood of a cube in a set of cubes.

Definition at line 1138 of file bddacycl.h.

Constructor & Destructor Documentation

◆ Neighbors()

template<class cubetype , class settype >
chomp::homology::Neighbors< cubetype, settype >::Neighbors ( const cubetype &  middle,
const settype &  cset,
BitField bfield 
)
inline

The default constructor.

Definition at line 1142 of file bddacycl.h.

1143 : q (middle), s (cset), b (bfield) {};
const cubetype & q
The cube whose neighbors are verified.
Definition: bddacycl.h:1161
const settype & s
The set of cubes in which the neighbors of the cube are sought.
Definition: bddacycl.h:1164
BitField & b
The bitfield to record each neighbor in.
Definition: bddacycl.h:1167

Member Function Documentation

◆ check()

template<class cubetype , class settype >
bool chomp::homology::Neighbors< cubetype, settype >::check ( int  n) const
inline

The procedure for checking whether the given neighbor exists.

The number of the neighbor is consistent with the "bit2neighbor" and "neighbor2bit" procedures.

Definition at line 1148 of file bddacycl.h.

1149 {
1150 cubetype neighbor = bit2neighbor (q, n);
1151 if (neighbor == q)
1152 return false;
1153 bool result = s. check (neighbor);
1154 if (result)
1155 b. set (n);
1156 return result;
1157 }
bool check(int n) const
The procedure for checking whether the given neighbor exists.
Definition: bddacycl.h:1148
tCube bit2neighbor(const tCube &q, int_t number, bool unconditional=false)
Creates the neighbor of the given cube with the specified number.
Definition: neighbor.h:165

References chomp::homology::Neighbors< cubetype, settype >::b, chomp::homology::bit2neighbor(), chomp::homology::Neighbors< cubetype, settype >::check(), chomp::homology::Neighbors< cubetype, settype >::q, and chomp::homology::Neighbors< cubetype, settype >::s.

Referenced by chomp::homology::Neighbors< cubetype, settype >::check().

Member Data Documentation

◆ b

template<class cubetype , class settype >
BitField& chomp::homology::Neighbors< cubetype, settype >::b
private

The bitfield to record each neighbor in.

Definition at line 1167 of file bddacycl.h.

Referenced by chomp::homology::Neighbors< cubetype, settype >::check().

◆ q

template<class cubetype , class settype >
const cubetype& chomp::homology::Neighbors< cubetype, settype >::q
private

The cube whose neighbors are verified.

Definition at line 1161 of file bddacycl.h.

Referenced by chomp::homology::Neighbors< cubetype, settype >::check().

◆ s

template<class cubetype , class settype >
const settype& chomp::homology::Neighbors< cubetype, settype >::s
private

The set of cubes in which the neighbors of the cube are sought.

Definition at line 1164 of file bddacycl.h.

Referenced by chomp::homology::Neighbors< cubetype, settype >::check().


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