Public Member Functions | Private Attributes

chomp::homology::Neighbors< cubetype, settype > Class Template Reference

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

#include <cubacycl.h>

List of all members.

Public Member Functions

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

Private Attributes

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

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 1139 of file cubacycl.h.


Constructor & Destructor Documentation

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 1143 of file cubacycl.h.

                                 : q (middle), s (cset), b (bfield) {};


Member Function Documentation

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 1149 of file cubacycl.h.

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

        {
                cubetype neighbor = bit2neighbor (q, n);
                if (neighbor == q)
                        return false;
                bool result = s. check (neighbor);
                if (result)
                        b. set (n);
                return result;
        }


Member Data Documentation

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

The bitfield to record each neighbor in.

Definition at line 1168 of file cubacycl.h.

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

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

The cube whose neighbors are verified.

Definition at line 1162 of file cubacycl.h.

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

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 1165 of file cubacycl.h.

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


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