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

All arithmetical progressions in {1,...,n}, in colexicographical 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_colex (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_colex< Int >

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

Deprecated:
To be improved (via using a standard output interface).

Usage:

  • Construct an object Arithmetical_progressions_colex 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 colexicographical order.
  • ap.next() can be called arbitrarily often, and runs through all arithmetic progressions of length k in {1,...}.
Todo:
Integration

Definition at line 308 of file VanderWaerden.hpp.


Member Typedef Documentation


Constructor & Destructor Documentation

Definition at line 325 of file VanderWaerden.hpp.


Member Function Documentation

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

Definition at line 334 of file VanderWaerden.hpp.


Member Data Documentation

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

Definition at line 315 of file VanderWaerden.hpp.


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