OKlibrary  0.2.1.6
OKlib::Combinatorics::Hypergraphs::Generators::Arithmetical_progressions< Int > Class Template Reference

All arithmetical progressions in {1,...,n}, in lexicographical order (in iterator-fashion, without storage) More...

#include <VanderWaerden.hpp>

List of all members.

Public Types

typedef Int Index
typedef std::vector< IndexArithmetical_progression

Public Member Functions

 Arithmetical_progressions (const Index k, const Index n)
Arithmetical_progression next ()

Static Public Member Functions

static std::string message ()

Public Attributes

const Index n
const Index k
 size of arithmetic progression in {1, ..., n}
const Index count
 number of arithmetic progressions of length k in {1, ..., n}

Detailed Description

template<typename Int>
class OKlib::Combinatorics::Hypergraphs::Generators::Arithmetical_progressions< Int >

All arithmetical progressions in {1,...,n}, in lexicographical order (in iterator-fashion, without storage)

Deprecated:
Old, "quick and dirty" implementation, to be improved (via using a standard output interface).

Usage:

  • Construct an object Arithmetical_progressions ap(k,n), where k is the length of the arithmetic progressions, to be considered in {1,...,n}.
  • In ap.count the total number of ap's is to be found.
  • Via calling ap.next() one then obtains the ap's, as vectors, in lexicographical order.
  • It is an error if ap.next() is called more than ap.count many times.
Todo:
Integration

Definition at line 232 of file VanderWaerden.hpp.


Member Typedef Documentation

Definition at line 262 of file VanderWaerden.hpp.

Definition at line 234 of file VanderWaerden.hpp.


Constructor & Destructor Documentation

Definition at line 249 of file VanderWaerden.hpp.


Member Function Documentation

template<typename Int>
static std::string OKlib::Combinatorics::Hypergraphs::Generators::Arithmetical_progressions< Int >::message ( ) [inline, static]

Definition at line 258 of file VanderWaerden.hpp.


Member Data Documentation

number of arithmetic progressions of length k in {1, ..., n}

Definition at line 239 of file VanderWaerden.hpp.

size of arithmetic progression in {1, ..., n}

Definition at line 237 of file VanderWaerden.hpp.

Referenced by OKlib::Combinatorics::Hypergraphs::Generators::Arithmetical_progressions< Index >::next().


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