Loading...
Searching...
No Matches
GFGenerator Class Reference

generate all elements in GF starting from 0 More...

`#include <cf_generator.h>`

## Public Member Functions

| GFGenerator ()
| ~GFGenerator ()
bool | hasItems () const
void | reset ()
CanonicalForm | item () const
void | next ()
void | operator++ ()
void | operator++ (int)
CFGenerator * | clone () const
| GFGenerator ()
| ~GFGenerator ()
bool | hasItems () const
void | reset ()
CanonicalForm | item () const
void | next ()
void | operator++ ()
void | operator++ (int)
CFGenerator * | clone () const
| GFGenerator ()
| ~GFGenerator ()
bool | hasItems () const
void | reset ()
CanonicalForm | item () const
void | next ()
void | operator++ ()
void | operator++ (int)
CFGenerator * | clone () const
Public Member Functions inherited from CFGenerator
| CFGenerator ()
virtual | ~CFGenerator ()
| CFGenerator ()
virtual | ~CFGenerator ()
| CFGenerator ()
virtual | ~CFGenerator ()

## Private Attributes

int | current

## Detailed Description

generate all elements in GF starting from 0

Definition at line 74 of file cf_generator.h.

## Constructor & Destructor Documentation

## GFGenerator() [1/3]

GFGenerator::GFGenerator | ( |  | ) |

Definition at line 57 of file cf_generator.cc.

{
current = gf_zero();
}
GFGenerator::current
int current
Definition cf_generator.h:77
gf_zero
int gf_zero()
Definition gfops.h:99

## ~GFGenerator() [1/3]

GFGenerator::~GFGenerator | ( |  | ) |

inline

Definition at line 80 of file cf_generator.h.

{}

## GFGenerator() [2/3]

GFGenerator::GFGenerator | ( |  | ) |

## ~GFGenerator() [2/3]

GFGenerator::~GFGenerator | ( |  | ) |

inline

Definition at line 745 of file factory.h.

{}

## GFGenerator() [3/3]

GFGenerator::GFGenerator | ( |  | ) |

## ~GFGenerator() [3/3]

GFGenerator::~GFGenerator | ( |  | ) |

inline

Definition at line 745 of file factory.h.

{}

## Member Function Documentation

## clone() [1/3]

CFGenerator * GFGenerator::clone | ( |  | ) | const

virtual

Reimplemented from CFGenerator.

Definition at line 89 of file cf_generator.cc.

{
return new GFGenerator();
}
GFGenerator::GFGenerator
GFGenerator()
Definition cf_generator.cc:57

## clone() [2/3]

CFGenerator * GFGenerator::clone | ( |  | ) | const

virtual

Reimplemented from CFGenerator.

## clone() [3/3]

CFGenerator * GFGenerator::clone | ( |  | ) | const

virtual

Reimplemented from CFGenerator.

## hasItems() [1/3]

bool GFGenerator::hasItems | ( |  | ) | const

virtual

Reimplemented from CFGenerator.

Definition at line 62 of file cf_generator.cc.

{
return ( current != gf_q + 1 );
}
gf_q
VAR int gf_q
Definition gfops.cc:47

## hasItems() [2/3]

bool GFGenerator::hasItems | ( |  | ) | const

virtual

Reimplemented from CFGenerator.

## hasItems() [3/3]

bool GFGenerator::hasItems | ( |  | ) | const

virtual

Reimplemented from CFGenerator.

## item() [1/3]

CanonicalForm GFGenerator::item | ( |  | ) | const

virtual

Reimplemented from CFGenerator.

Definition at line 72 of file cf_generator.cc.

{
ASSERT( current != gf_q + 1, "no more items" );
return CanonicalForm( int2imm_gf( current ) );
}
ASSERT
#define ASSERT(expression, message)
Definition cf_assert.h:99
int2imm_gf
InternalCF * int2imm_gf(long i)
Definition imm.h:106

## item() [2/3]

CanonicalForm GFGenerator::item | ( |  | ) | const

virtual

Reimplemented from CFGenerator.

## item() [3/3]

CanonicalForm GFGenerator::item | ( |  | ) | const

virtual

Reimplemented from CFGenerator.

## next() [1/3]

void GFGenerator::next | ( |  | ) |

virtual

Reimplemented from CFGenerator.

Definition at line 78 of file cf_generator.cc.

{
ASSERT( current != gf_q + 1, "no more items" );
if ( gf_iszero( current ) )
current = 0;
else if ( current == gf_q1 - 1 )
current = gf_q + 1;
else
current++;
}
gf_q1
VAR int gf_q1
Definition gfops.cc:50
gf_iszero
bool gf_iszero(int a)
Definition gfops.h:43

## next() [2/3]

void GFGenerator::next | ( |  | ) |

virtual

Reimplemented from CFGenerator.

## next() [3/3]

void GFGenerator::next | ( |  | ) |

virtual

Reimplemented from CFGenerator.

## operator++() [1/6]

void GFGenerator::operator++ | ( |  | ) |

inline

Definition at line 85 of file cf_generator.h.

{ next(); }
GFGenerator::next
void next()
Definition cf_generator.cc:78

## operator++() [2/6]

void GFGenerator::operator++ | ( |  | ) |

inline

Definition at line 750 of file factory.h.

{ next(); }

## operator++() [3/6]

void GFGenerator::operator++ | ( |  | ) |

inline

Definition at line 750 of file factory.h.

{ next(); }

## operator++() [4/6]

void GFGenerator::operator++ | ( | int |  | ) |

inline

Definition at line 86 of file cf_generator.h.

{ next(); }

## operator++() [5/6]

void GFGenerator::operator++ | ( | int |  | ) |

inline

Definition at line 751 of file factory.h.

{ next(); }

## operator++() [6/6]

void GFGenerator::operator++ | ( | int |  | ) |

inline

Definition at line 751 of file factory.h.

{ next(); }

## reset() [1/3]

void GFGenerator::reset | ( |  | ) |

virtual

Reimplemented from CFGenerator.

Definition at line 67 of file cf_generator.cc.

{
current = gf_zero();
}

## reset() [2/3]

void GFGenerator::reset | ( |  | ) |

virtual

Reimplemented from CFGenerator.

## reset() [3/3]

void GFGenerator::reset | ( |  | ) |

virtual

Reimplemented from CFGenerator.

## Field Documentation

## current

int GFGenerator::current

private

Definition at line 77 of file cf_generator.h.

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

- factory/cf_generator.h
- factory/factory.h
- factory/include/factory/factory.h
- factory/cf_generator.cc