HyperRogue  11.3d
game/visualization engine based on non-Euclidean geometry
Public Member Functions | Public Attributes | List of all members
hr::connection_table< T > Struct Template Reference

Public Member Functions

unsigned char * spintable ()
 
T * full ()
 
void setspin (int d, int spin, bool mirror)
 
int spin (int d)
 
bool mirror (int d)
 
int fix (int d)
 
T *& move (int i)
 
T *& modmove (int i)
 
unsigned char modspin (int i)
 
void fullclear ()
 
void connect (int d0, T *c1, int d1, bool m)
 
void connect (int d0, walker< T > hs)
 

Public Attributes

T * move_table [FULL_EDGE+(FULL_EDGE+sizeof(char *) - 1)/sizeof(char *)]
 

Member Function Documentation

◆ full()

template<class T >
T* hr::connection_table< T >::full ( )
inline

get the full T from the pointer to this connection table

◆ setspin()

template<class T >
void hr::connection_table< T >::setspin ( int  d,
int  spin,
bool  mirror 
)
inline

for the edge d, set the spin and mirror attributes

◆ spin()

template<class T >
int hr::connection_table< T >::spin ( int  d)
inline

we are spin(i)-th neighbor of move[i]

◆ mirror()

template<class T >
bool hr::connection_table< T >::mirror ( int  d)
inline

on non-orientable surfaces, the d-th edge may be mirrored

◆ fix()

template<class T >
int hr::connection_table< T >::fix ( int  d)
inline

'fix' the edge number d to get the actual index in [0, degree())

◆ move()

template<class T >
T*& hr::connection_table< T >::move ( int  i)
inline

T in the direction i

◆ modmove()

template<class T >
T*& hr::connection_table< T >::modmove ( int  i)
inline

T in the direction i, modulo degree()

◆ fullclear()

template<class T >
void hr::connection_table< T >::fullclear ( )
inline

initialize the table

◆ connect()

template<class T >
void hr::connection_table< T >::connect ( int  d0,
T *  c1,
int  d1,
bool  m 
)
inline

connect this in direction d0 to c1 in direction d1, possibly mirrored

Member Data Documentation

◆ move_table

template<class T >
T* hr::connection_table< T >::move_table[FULL_EDGE+(FULL_EDGE+sizeof(char *) - 1)/sizeof(char *)]

Table of moves. This is the maximum size, but tailored_alloc allocates less.


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