-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathresults_generator.h
45 lines (37 loc) · 1.11 KB
/
results_generator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once
#include "layout2d.h"
namespace Denisenko {
namespace Raskroy {
class ResultsGenerator {
public:
bool ControlRemains;
ResultsGenerator(void)
: ControlRemains(false), m_remains(0),
m_layout2d(m_sizes, m_minSize, &m_remains)
{
}
void put_SawThickness(scalar x) throw () {m_layout2d.put_SawThickness(x);}
scalar get_SawThickness(void) throw () {return m_layout2d.get_SawThickness();}
void Begin(Parts &parts, const Parts &sheets);
bool NextResult(Result &res);
float GetPercentCompleted();
private:
Amounts m_remains;
Layout2d m_layout2d;
Sizes m_sizes[2];
scalar m_minSize[2];
Parts m_sheets;
Parts m_parts;
//Parts m_inputParts;
//Parts m_splitedParts;
void RemoveExostedSizes(void);
void CheckResult(const Result& result);
//void SubstractPartsAmounts(const Amounts& amounts);
};
Parts SplitEqualParts(const Parts& parts);
//double GetEstimatedTime(const Parts& parts, const Sheet& sheet);
double GetAverageSizeA(const Parts& parts);
double GetAverageSizeB(const Parts& parts);
int Combinations(int smallSet, int fullSet);
} // namespace Denisenko
} // namespace Raskroy