Frobby 0.10.0
Loading...
Searching...
No Matches
randomDataGenerators.h File Reference
#include <vector>
Include dependency graph for randomDataGenerators.h:

Go to the source code of this file.

Functions

void generateLinkedListIdeal (BigIdeal &ideal, size_t varCount)
void generateKingChessIdeal (BigIdeal &ideal, size_t rowsAndColumns)
void generateKnightChessIdeal (BigIdeal &ideal, size_t rowsAndColumns)
void generateRookChessIdeal (BigIdeal &bigIdeal, size_t n, size_t k)
void generateMatchingIdeal (BigIdeal &bigIdeal, size_t n)
void generateTreeIdeal (BigIdeal &ideal, size_t varCount)
bool generateRandomEdgeIdeal (BigIdeal &ideal, size_t varCount, size_t generatorCount)
bool generateRandomIdeal (BigIdeal &bigIdeal, size_t exponentRange, size_t varCount, size_t generatorCount)
void generateRandomFrobeniusInstance (vector< mpz_class > &degrees, size_t entryCount, const mpz_class &maxEntry)

Detailed Description

This file contains functions that generate data. They are NOT all random.

Todo
Fix the name of the file, since not everything here is random, and consider the structure of the code. E.g. does generating Frobenius instances belong with the code generating monomial ideals? Should these methods be free functions? Should there be a facade which does nearly nothing but to call these functions? Should this be the place where the description of these ideals is presented? Shouldn't these be returning their output using a consumer? Shouldn't there be a clear mapping between these ideals' names as strings and the function creating them, rather than just having a static list in the Action that creates these?

Function Documentation

◆ generateKingChessIdeal()

void generateKingChessIdeal ( BigIdeal & ideal,
size_t rowsAndColumns )

Generate an ideal where $x_(a,b)*x_(c,d)$ is a generator when $(a,b)$ and $(c,d)$ indicate coordinates on a square chessboard where the move is a valid king's move.

◆ generateKnightChessIdeal()

void generateKnightChessIdeal ( BigIdeal & ideal,
size_t rowsAndColumns )

Generate an ideal where $x_(a,b)*x_(c,d)$ is a generator when $(a,b)$ and $(c,d)$ indicate coordinates on a square chessboard where the move is a valid knight's move.

◆ generateLinkedListIdeal()

void generateLinkedListIdeal ( BigIdeal & ideal,
size_t varCount )

Generate an ideal of the form $x_1*x_2$, $x_2*x_3$ and so on.

◆ generateMatchingIdeal()

void generateMatchingIdeal ( BigIdeal & bigIdeal,
size_t n )

Generate an ideal whose facets are the maximum matchings in an n-clique.

◆ generateRandomEdgeIdeal()

bool generateRandomEdgeIdeal ( BigIdeal & ideal,
size_t varCount,
size_t generatorCount )

Generate a random ideal where every edge is a product of two different variables. Returns true if the requested number of generators was achieved.

◆ generateRandomFrobeniusInstance()

void generateRandomFrobeniusInstance ( vector< mpz_class > & degrees,
size_t entryCount,
const mpz_class & maxEntry )

Generate a random vector of numbers whose gcd is 1.

Todo
: preserve state across calls.

◆ generateRandomIdeal()

bool generateRandomIdeal ( BigIdeal & bigIdeal,
size_t exponentRange,
size_t varCount,
size_t generatorCount )

Generate a random ideal with exponents in the range [0, exponentRange]. Returns true if the requested number of generators was achieved.

◆ generateRookChessIdeal()

void generateRookChessIdeal ( BigIdeal & bigIdeal,
size_t n,
size_t k )

Generate an ideal in n*k variables. Each facet corresponds to a way of placing rooks on an n*k chessboard without any rooks being able to take any other rook in one move.

◆ generateTreeIdeal()

void generateTreeIdeal ( BigIdeal & ideal,
size_t varCount )

Generate an ideal in varCount variables with minimal generators given by

\‍[\left\langle
  \left.
    \left(
      \prod_{i\in F}x_i
    \right)^{n-|F|+1}
  \right|
  \emptyset\neq F\subseteq
  \left\{
    1,\ldots,n
  \right\}
\right\rangle
,\‍]

i.e. to get the minimal generators, take each square free monomial except the identity, and raise it to the power of varCount + 1 minus it's total degree.