genomicSimulationC 0.2.6
Data Fields
gsc_BidirectionalIterator Struct Reference

A structure to iterate forwards and backwards through all genotypes in a gsc_SimData or through only the members of a group. More...

#include <sim-operations.h>

+ Collaboration diagram for gsc_BidirectionalIterator:

Data Fields

gsc_AlleleMatrixam
 Simulation genotypes through which to iterate. More...
 
const gsc_GroupNum group
 Group through which to iterate. More...
 
unsigned int localPos
 Local index (index within the cachedAM) of the genotype in the linked list of gsc_AlleleMatrix beginning at d->m where the iterator's 'cursor' currently sits. More...
 
gsc_AlleleMatrixcachedAM
 Pointer to the gsc_AlleleMatrix from the linked list of gsc_AlleleMatrix beginning at d->m where the iterator's 'cursor' currently sits. More...
 
unsigned int cachedAMIndex
 Index of cachedAM in the linked list of gsc_AlleleMatrix beginning at d->m. More...
 
_Bool atEnd
 Boolean that is TRUE if the iterator's 'cursor' is on the last genotype (genotype with the highest index in the gsc_SimData) that fulfils the group critera of this iterator. More...
 
_Bool atStart
 Boolean that is TRUE if the iterator's 'cursor' is on the first genotype (genotype with the lowest index in the gsc_SimData) that fulfils the group critera of this iterator. More...
 

Detailed Description

A structure to iterate forwards and backwards through all genotypes in a gsc_SimData or through only the members of a group.

Has short name: BidirectionalIterator

See also
gsc_create_bidirectional_iter

Definition at line 1253 of file sim-operations.h.

Field Documentation

◆ am

gsc_AlleleMatrix* gsc_BidirectionalIterator::am

Simulation genotypes through which to iterate.

Definition at line 1254 of file sim-operations.h.

◆ atEnd

_Bool gsc_BidirectionalIterator::atEnd

Boolean that is TRUE if the iterator's 'cursor' is on the last genotype (genotype with the highest index in the gsc_SimData) that fulfils the group critera of this iterator.

Definition at line 1271 of file sim-operations.h.

◆ atStart

_Bool gsc_BidirectionalIterator::atStart

Boolean that is TRUE if the iterator's 'cursor' is on the first genotype (genotype with the lowest index in the gsc_SimData) that fulfils the group critera of this iterator.

Definition at line 1274 of file sim-operations.h.

◆ cachedAM

gsc_AlleleMatrix* gsc_BidirectionalIterator::cachedAM

Pointer to the gsc_AlleleMatrix from the linked list of gsc_AlleleMatrix beginning at d->m where the iterator's 'cursor' currently sits.

Contains the genotype at localPos.

Definition at line 1263 of file sim-operations.h.

◆ cachedAMIndex

unsigned int gsc_BidirectionalIterator::cachedAMIndex

Index of cachedAM in the linked list of gsc_AlleleMatrix beginning at d->m.

d->m is considered to be index 0.

Definition at line 1267 of file sim-operations.h.

◆ group

const gsc_GroupNum gsc_BidirectionalIterator::group

Group through which to iterate.

If it is 0, then iterate through all genotypes in the simulation. Otherwise, iterate through members of the group with this as their group number.

Definition at line 1255 of file sim-operations.h.

◆ localPos

unsigned int gsc_BidirectionalIterator::localPos

Local index (index within the cachedAM) of the genotype in the linked list of gsc_AlleleMatrix beginning at d->m where the iterator's 'cursor' currently sits.

Definition at line 1259 of file sim-operations.h.


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