#include <xmath.h>
Definition at line 316 of file xmath.h.
TComb::TComb |
( |
const int & |
_Items, |
|
|
const int & |
_Order |
|
) |
| |
|
inline |
int TComb::GetCombN |
( |
| ) |
const |
|
inline |
int TComb::GetCombs |
( |
| ) |
const |
Definition at line 759 of file xmath.cpp.
760 int LCombs=1;
int HCombs=1;
761 for (
int OrderN=0; OrderN<
Order; OrderN++){
762 LCombs*=OrderN+1; HCombs*=
Items-OrderN;}
763 int Combs=HCombs/LCombs;
TIntV& TComb::GetItemV |
( |
| ) |
|
|
inline |
Definition at line 735 of file xmath.cpp.
738 for (
int OrderN=0; OrderN<
Order; OrderN++){
739 ItemV[OrderN]=OrderN;}
744 while ((OrderN>=0)&&(
ItemV[OrderN]==
Items-(
Order-OrderN-1)-1)){OrderN--;}
749 for (
int SubOrderN=OrderN+1; SubOrderN<
Order; SubOrderN++){
751 CombN++;
return true;
TSizeTy Len() const
Returns the number of elements in the vector.
const TVal & Last() const
Returns a reference to the last element of the vector.
void Gen(const TSizeTy &_Vals)
Constructs a vector (an array) of _Vals elements.
static PComb TComb::New |
( |
const int & |
Items, |
|
|
const int & |
Order |
|
) |
| |
|
inlinestatic |
void TComb::Save |
( |
TSOut & |
| ) |
|
|
inline |
Definition at line 767 of file xmath.cpp.
769 for (
int OrderN=0; OrderN<
Order; OrderN++){
770 if (OrderN>0){printf(
" ");}
771 printf(
"%d",
ItemV[OrderN]());
The documentation for this class was generated from the following files: