Samchon Framework for CPP  1.0.0
samchon::library::CombinedPermutationGenerator Class Reference

A combined-permutation case generator. More...

#include <CombinedPermutationGenerator.hpp>

Collaboration diagram for samchon::library::CombinedPermutationGenerator:

Public Member Functions

 CombinedPermutationGenerator (size_t n, size_t r)
 Construct from size of N and R. More...
 
virtual auto operator[] (size_t index) const -> std::vector< size_t > override
 Get x'th case. More...
 
- Public Member Functions inherited from samchon::library::CaseGenerator
 CaseGenerator (size_t n, size_t r)
 Construct from size of N and R. More...
 
auto size () const -> size_t
 Get size of all cases. More...
 
auto at (size_t index) const -> std::vector< size_t >
 
auto n () const -> size_t
 Get size of the N. More...
 
auto r () const -> size_t
 Get size of the R. More...
 
auto toMatrix () const -> std::vector< std::vector< size_t >>
 Create a matrix containing all cases. More...
 

Additional Inherited Members

- Protected Attributes inherited from samchon::library::CaseGenerator
size_t n_
 N, size of the candidates. More...
 
size_t r_
 R, size of elements of each case. More...
 
size_t size_
 Size, the number of all cases. More...
 

Detailed Description

A combined-permutation case generator.

nTTr

Class Diagram

Library - Genetic Algorithm

Author
Jeongho Nam http://samchon.org

Definition at line 18 of file CombinedPermutationGenerator.hpp.

Constructor & Destructor Documentation

samchon::library::CombinedPermutationGenerator::CombinedPermutationGenerator ( size_t  n,
size_t  r 
)
inline

Construct from size of N and R.

Parameters
nSize of candidates
rSize of elements of each case

Definition at line 32 of file CombinedPermutationGenerator.hpp.

References samchon::library::CaseGenerator::r(), and samchon::library::CaseGenerator::size_.

Here is the call graph for this function:

Member Function Documentation

virtual auto samchon::library::CombinedPermutationGenerator::operator[] ( size_t  ) const -> std::vector< size_t >
inlineoverridevirtual

Get x'th case.

Returns
The row of the x'th in combined permuation case

Implements samchon::library::CaseGenerator.

Definition at line 46 of file CombinedPermutationGenerator.hpp.

References samchon::library::CaseGenerator::n_, and samchon::library::CaseGenerator::r_.


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