C++ Library Extensions 2022.12.09
To help learn modern C++ programming
tpf::ncrnpr::combination Class Reference

#include <tpf_ncrnpr.hpp>

Public Types

using number_t = big_unsigned_t
 
using m_th_t = number_t
 
using signed_m_th_t = big_integer_t
 
using rational_t = simple_positive_rational< number_t >
 

Public Member Functions

 combination ()
 
 combination (const combination &)=default
 
combinationoperator= (const combination &)=default
 
template<typename Type >
 combination (Type n)
 
template<typename Type1 , typename Type2 >
 combination (Type1 n, Type2 r)
 
number_t operator() () const
 
template<typename Type1 , typename Type2 >
number_t reset (Type1 n=Type1{}, Type2 r=Type2{})
 
template<typename Type >
number_t set_r (Type r)
 
template<typename Type >
number_t set_n (Type n)
 
number_t decrement_nr ()
 
number_t increment_nr ()
 
number_t increment_r ()
 
number_t decrement_r ()
 
number_t increment_n ()
 
number_t decrement_n ()
 
template<typename Type1 , typename Type2 >
number_t operator() (Type1 n, Type2 r)
 
template<typename Type >
 operator Type () const
 

Protected Member Functions

template<typename Type >
void offset_nr (Type offset)
 
template<typename Type >
void offset_n (Type offset)
 
template<typename Type >
void offset_r (Type offset)
 

Protected Attributes

number_t m_n {}
 
number_t m_r {}
 
number_t m_ncr {1}
 

Friends

std::ostream & operator<< (std::ostream &os, const combination &cb)
 

Detailed Description

Definition at line 457 of file tpf_ncrnpr.hpp.

Member Typedef Documentation

◆ m_th_t

Definition at line 461 of file tpf_ncrnpr.hpp.

◆ number_t

◆ rational_t

◆ signed_m_th_t

Constructor & Destructor Documentation

◆ combination() [1/4]

tpf::ncrnpr::combination::combination ( )
inline

Definition at line 564 of file tpf_ncrnpr.hpp.

◆ combination() [2/4]

tpf::ncrnpr::combination::combination ( const combination )
default

◆ combination() [3/4]

template<typename Type >
tpf::ncrnpr::combination::combination ( Type  n)
inline

Definition at line 569 of file tpf_ncrnpr.hpp.

◆ combination() [4/4]

template<typename Type1 , typename Type2 >
tpf::ncrnpr::combination::combination ( Type1  n,
Type2  r 
)
inline

Definition at line 573 of file tpf_ncrnpr.hpp.

Member Function Documentation

◆ decrement_n()

number_t tpf::ncrnpr::combination::decrement_n ( )
inline

Definition at line 679 of file tpf_ncrnpr.hpp.

Here is the caller graph for this function:

◆ decrement_nr()

number_t tpf::ncrnpr::combination::decrement_nr ( )
inline

Definition at line 615 of file tpf_ncrnpr.hpp.

Here is the caller graph for this function:

◆ decrement_r()

number_t tpf::ncrnpr::combination::decrement_r ( )
inline

Definition at line 650 of file tpf_ncrnpr.hpp.

◆ increment_n()

number_t tpf::ncrnpr::combination::increment_n ( )
inline

Definition at line 665 of file tpf_ncrnpr.hpp.

◆ increment_nr()

number_t tpf::ncrnpr::combination::increment_nr ( )
inline

Definition at line 626 of file tpf_ncrnpr.hpp.

◆ increment_r()

number_t tpf::ncrnpr::combination::increment_r ( )
inline

Definition at line 637 of file tpf_ncrnpr.hpp.

◆ offset_n()

template<typename Type >
void tpf::ncrnpr::combination::offset_n ( Type  offset)
inlineprotected

Definition at line 501 of file tpf_ncrnpr.hpp.

Here is the caller graph for this function:

◆ offset_nr()

template<typename Type >
void tpf::ncrnpr::combination::offset_nr ( Type  offset)
inlineprotected

Definition at line 470 of file tpf_ncrnpr.hpp.

◆ offset_r()

template<typename Type >
void tpf::ncrnpr::combination::offset_r ( Type  offset)
inlineprotected

Definition at line 532 of file tpf_ncrnpr.hpp.

Here is the caller graph for this function:

◆ operator Type()

template<typename Type >
tpf::ncrnpr::combination::operator Type ( ) const
inline

Definition at line 705 of file tpf_ncrnpr.hpp.

◆ operator()() [1/2]

number_t tpf::ncrnpr::combination::operator() ( ) const
inline

Definition at line 576 of file tpf_ncrnpr.hpp.

◆ operator()() [2/2]

template<typename Type1 , typename Type2 >
number_t tpf::ncrnpr::combination::operator() ( Type1  n,
Type2  r 
)
inline

Definition at line 694 of file tpf_ncrnpr.hpp.

Here is the call graph for this function:

◆ operator=()

combination & tpf::ncrnpr::combination::operator= ( const combination )
default

◆ reset()

template<typename Type1 , typename Type2 >
number_t tpf::ncrnpr::combination::reset ( Type1  n = Type1{},
Type2  r = Type2{} 
)
inline

Definition at line 580 of file tpf_ncrnpr.hpp.

◆ set_n()

template<typename Type >
number_t tpf::ncrnpr::combination::set_n ( Type  n)
inline

Definition at line 603 of file tpf_ncrnpr.hpp.

Here is the call graph for this function:

◆ set_r()

template<typename Type >
number_t tpf::ncrnpr::combination::set_r ( Type  r)
inline

Definition at line 589 of file tpf_ncrnpr.hpp.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const combination cb 
)
friend

Definition at line 707 of file tpf_ncrnpr.hpp.

Member Data Documentation

◆ m_n

number_t tpf::ncrnpr::combination::m_n {}
mutableprotected

Definition at line 467 of file tpf_ncrnpr.hpp.

◆ m_ncr

number_t tpf::ncrnpr::combination::m_ncr {1}
protected

Definition at line 467 of file tpf_ncrnpr.hpp.

◆ m_r

number_t tpf::ncrnpr::combination::m_r {}
protected

Definition at line 467 of file tpf_ncrnpr.hpp.


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