Added init forgotten init of FiniteFunction
This commit is contained in:
@@ -14,6 +14,8 @@ class FiniteFunction {
|
|||||||
// инициализатор
|
// инициализатор
|
||||||
template <class Callable>
|
template <class Callable>
|
||||||
FiniteFunction(Callable initer) : _num(0) {
|
FiniteFunction(Callable initer) : _num(0) {
|
||||||
|
for (auto && el: _results)
|
||||||
|
el = 0;
|
||||||
for (CellType first = 0; first < BASE; ++first)
|
for (CellType first = 0; first < BASE; ++first)
|
||||||
for (CellType second = 0; second < BASE; ++second) {
|
for (CellType second = 0; second < BASE; ++second) {
|
||||||
auto inited_result = initer(first, second);
|
auto inited_result = initer(first, second);
|
||||||
@@ -23,6 +25,8 @@ class FiniteFunction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
explicit FiniteFunction(std::string text_repr) {
|
explicit FiniteFunction(std::string text_repr) {
|
||||||
|
for (auto && el: _results)
|
||||||
|
el = 0;
|
||||||
size_t cur_ind = 0;
|
size_t cur_ind = 0;
|
||||||
for (auto ch: text_repr) {
|
for (auto ch: text_repr) {
|
||||||
if ( !isdigit(ch) )
|
if ( !isdigit(ch) )
|
||||||
|
|||||||
Reference in New Issue
Block a user