|
Samchon Framework for CPP
1.0.0
|
Case generator. More...
#include <CaseGenerator.hpp>
Public Member Functions | |
| 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... | |
| virtual auto | operator[] (size_t) const -> std::vector< size_t >=0 |
| Get x'th case. 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... | |
Protected Attributes | |
| 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... | |
Case generator.
An abstract case generator using like a matrix
Definition at line 23 of file CaseGenerator.hpp.
|
inline |
Construct from size of N and R.
| n | Size of candidates |
| r | Size of elements of each case |
Definition at line 51 of file CaseGenerator.hpp.

|
inline |
Get size of all cases.
Definition at line 66 of file CaseGenerator.hpp.
References operator[](), and size_.
Referenced by at(), and samchon::examples::packer::Packer::optimize().


|
pure virtual |
Get x'th case.
Implemented in samchon::library::PermutationGenerator, and samchon::library::CombinedPermutationGenerator.
Referenced by at(), and size().

|
inline |
Definition at line 81 of file CaseGenerator.hpp.
References operator[](), and size().

|
inline |
Get size of the N.
Definition at line 92 of file CaseGenerator.hpp.
References n_.
Referenced by CaseGenerator(), and samchon::library::PermutationGenerator::PermutationGenerator().

|
inline |
Get size of the R.
Definition at line 100 of file CaseGenerator.hpp.
References r_.
Referenced by CaseGenerator(), and samchon::library::CombinedPermutationGenerator::CombinedPermutationGenerator().

|
inline |
Create a matrix containing all cases.
Definition at line 115 of file CaseGenerator.hpp.
References size_.
|
protected |
N, size of the candidates.
Definition at line 29 of file CaseGenerator.hpp.
Referenced by n(), and samchon::library::CombinedPermutationGenerator::operator[]().
|
protected |
R, size of elements of each case.
Definition at line 34 of file CaseGenerator.hpp.
Referenced by samchon::library::CombinedPermutationGenerator::operator[](), samchon::library::PermutationGenerator::operator[](), and r().
|
protected |
Size, the number of all cases.
Definition at line 39 of file CaseGenerator.hpp.
Referenced by samchon::library::CombinedPermutationGenerator::CombinedPermutationGenerator(), samchon::library::PermutationGenerator::PermutationGenerator(), size(), and toMatrix().