Loading...
Searching...
No Matches
AlgExtRandomF Class Reference

generate random elements in F_p(alpha) More...

`#include <cf_random.h>`

## Public Member Functions

| AlgExtRandomF (const AlgExtRandomF &)
| AlgExtRandomF (const Variable &v)
| AlgExtRandomF (const Variable &v1, const Variable &v2)
| ~AlgExtRandomF ()
CanonicalForm | generate () const
CFRandom * | clone () const
| AlgExtRandomF (const AlgExtRandomF &)
| AlgExtRandomF (const Variable &v)
| AlgExtRandomF (const Variable &v1, const Variable &v2)
| ~AlgExtRandomF ()
CanonicalForm | generate () const
CFRandom * | clone () const
| AlgExtRandomF (const AlgExtRandomF &)
| AlgExtRandomF (const Variable &v)
| AlgExtRandomF (const Variable &v1, const Variable &v2)
| ~AlgExtRandomF ()
CanonicalForm | generate () const
CFRandom * | clone () const
Public Member Functions inherited from CFRandom
virtual | ~CFRandom ()
virtual | ~CFRandom ()
virtual | ~CFRandom ()

## Private Member Functions

| AlgExtRandomF ()
| AlgExtRandomF (const Variable &v, CFRandom *g, int nn)
AlgExtRandomF & | operator= (const AlgExtRandomF &)
| AlgExtRandomF ()
| AlgExtRandomF (const Variable &v, CFRandom *g, int nn)
AlgExtRandomF & | operator= (const AlgExtRandomF &)
| AlgExtRandomF ()
| AlgExtRandomF (const Variable &v, CFRandom *g, int nn)
AlgExtRandomF & | operator= (const AlgExtRandomF &)

## Private Attributes

Variable | algext
CFRandom * | gen
int | n

## Detailed Description

generate random elements in F_p(alpha)

Definition at line 70 of file cf_random.h.

## Constructor & Destructor Documentation

## AlgExtRandomF() [1/15]

AlgExtRandomF::AlgExtRandomF | ( |  | ) |

private

Definition at line 110 of file cf_random.cc.

{
ASSERT( 0, "not a valid random generator" );
}
ASSERT
#define ASSERT(expression, message)
Definition cf_assert.h:99

## AlgExtRandomF() [2/15]

AlgExtRandomF::AlgExtRandomF | ( | const Variable & | v,
|  | CFRandom * | g,
|  | int | nn )

private

Definition at line 142 of file cf_random.cc.

{
algext = v;
n = nn;
gen = g;
}
g
g
Definition cfModGcd.cc:4098
AlgExtRandomF::gen
CFRandom * gen
Definition cf_random.h:73
AlgExtRandomF::algext
Variable algext
Definition cf_random.h:72
AlgExtRandomF::n
int n
Definition cf_random.h:74
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39

## AlgExtRandomF() [3/15]

AlgExtRandomF::AlgExtRandomF | ( | const AlgExtRandomF & |  | ) |

Definition at line 115 of file cf_random.cc.

{
ASSERT( 0, "not a valid random generator" );
}

## AlgExtRandomF() [4/15]

AlgExtRandomF::AlgExtRandomF | ( | const Variable & | v | ) |

Definition at line 126 of file cf_random.cc.

{
ASSERT( v.level() < 0, "not an algebraic extension" );
algext = v;
n = degree( getMipo( v ) );
gen = CFRandomFactory::generate();
}
CFRandomFactory::generate
static CFRandom * generate()
Definition cf_random.cc:167
Variable::level
int level() const
Definition factory.h:143
degree
int degree(const CanonicalForm &f)
Definition factory.h:457
getMipo
CanonicalForm getMipo(const Variable &alpha, const Variable &x)
Definition variable.cc:207

## AlgExtRandomF() [5/15]

AlgExtRandomF::AlgExtRandomF | ( | const Variable & | v1,
|  | const Variable & | v2 )

Definition at line 134 of file cf_random.cc.

{
ASSERT( v1.level() < 0 && v2.level() < 0 && v1 != v2, "not an algebraic extension" );
algext = v2;
n = degree( getMipo( v2 ) );
gen = new AlgExtRandomF( v1 );
}
AlgExtRandomF::AlgExtRandomF
AlgExtRandomF()
Definition cf_random.cc:110

## ~AlgExtRandomF() [1/3]

AlgExtRandomF::~AlgExtRandomF | ( |  | ) |

Definition at line 149 of file cf_random.cc.

{
delete gen;
}

## AlgExtRandomF() [6/15]

AlgExtRandomF::AlgExtRandomF | ( |  | ) |

private

## AlgExtRandomF() [7/15]

AlgExtRandomF::AlgExtRandomF | ( | const Variable & | v,
|  | CFRandom * | g,
|  | int | nn )

private

## AlgExtRandomF() [8/15]

AlgExtRandomF::AlgExtRandomF | ( | const AlgExtRandomF & |  | ) |

## AlgExtRandomF() [9/15]

AlgExtRandomF::AlgExtRandomF | ( | const Variable & | v | ) |

## AlgExtRandomF() [10/15]

AlgExtRandomF::AlgExtRandomF | ( | const Variable & | v1,
|  | const Variable & | v2 )

## ~AlgExtRandomF() [2/3]

AlgExtRandomF::~AlgExtRandomF | ( |  | ) |

## AlgExtRandomF() [11/15]

AlgExtRandomF::AlgExtRandomF | ( |  | ) |

private

## AlgExtRandomF() [12/15]

AlgExtRandomF::AlgExtRandomF | ( | const Variable & | v,
|  | CFRandom * | g,
|  | int | nn )

private

## AlgExtRandomF() [13/15]

AlgExtRandomF::AlgExtRandomF | ( | const AlgExtRandomF & |  | ) |

## AlgExtRandomF() [14/15]

AlgExtRandomF::AlgExtRandomF | ( | const Variable & | v | ) |

## AlgExtRandomF() [15/15]

AlgExtRandomF::AlgExtRandomF | ( | const Variable & | v1,
|  | const Variable & | v2 )

## ~AlgExtRandomF() [3/3]

AlgExtRandomF::~AlgExtRandomF | ( |  | ) |

## Member Function Documentation

## clone() [1/3]

CFRandom * AlgExtRandomF::clone | ( |  | ) | const

virtual

Reimplemented from CFRandom.

Definition at line 162 of file cf_random.cc.

{
return new AlgExtRandomF( algext, gen->clone(), n );
}

## clone() [2/3]

CFRandom * AlgExtRandomF::clone | ( |  | ) | const

virtual

Reimplemented from CFRandom.

## clone() [3/3]

CFRandom * AlgExtRandomF::clone | ( |  | ) | const

virtual

Reimplemented from CFRandom.

## generate() [1/3]

CanonicalForm AlgExtRandomF::generate | ( |  | ) | const

virtual

Reimplemented from CFRandom.

Definition at line 154 of file cf_random.cc.

{
CanonicalForm result;
for ( int i = 0; i < n; i++ )
result += power( algext, i ) * gen->generate();
return result;
}
i
int i
Definition cfEzgcd.cc:132
result
return result
Definition facAbsBiFact.cc:76
power
CanonicalForm FACTORY_PUBLIC power(const CanonicalForm &f, int n)
exponentiation
Definition canonicalform.cc:1896

## generate() [2/3]

CanonicalForm AlgExtRandomF::generate | ( |  | ) | const

virtual

Reimplemented from CFRandom.

## generate() [3/3]

CanonicalForm AlgExtRandomF::generate | ( |  | ) | const

virtual

Reimplemented from CFRandom.

## operator=() [1/3]

AlgExtRandomF & AlgExtRandomF::operator= | ( | const AlgExtRandomF & |  | ) |

private

Definition at line 120 of file cf_random.cc.

{
ASSERT( 0, "not a valid random generator" );
return *this;
}

## operator=() [2/3]

AlgExtRandomF & AlgExtRandomF::operator= | ( | const AlgExtRandomF & |  | ) |

private

## operator=() [3/3]

AlgExtRandomF & AlgExtRandomF::operator= | ( | const AlgExtRandomF & |  | ) |

private

## Field Documentation

## algext

Variable AlgExtRandomF::algext

private

Definition at line 72 of file cf_random.h.

## gen

CFRandom * AlgExtRandomF::gen

private

Definition at line 73 of file cf_random.h.

## n

int AlgExtRandomF::n

private

Definition at line 74 of file cf_random.h.

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

- factory/cf_random.h
- factory/factory.h
- factory/include/factory/factory.h
- factory/cf_random.cc