2017-12-18 21:24:21 +01:00
|
|
|
//
|
|
|
|
// Created by mpapa on 05.12.2017.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef SOURCE_ABSTRACTIONLAYER_1_H
|
|
|
|
#define SOURCE_ABSTRACTIONLAYER_1_H
|
|
|
|
|
|
|
|
#include "AbstractionLayer_1_Properties.h"
|
2017-12-21 12:20:57 +01:00
|
|
|
#include "../AbstraktionLayer_Base.h"
|
|
|
|
|
2017-12-18 21:24:21 +01:00
|
|
|
#include <vector>
|
|
|
|
#include <iostream>
|
|
|
|
#include <bitset>
|
2017-12-20 17:35:52 +01:00
|
|
|
#include <random>
|
2017-12-18 21:24:21 +01:00
|
|
|
|
2017-12-21 12:20:57 +01:00
|
|
|
class AbstractionLayer_1 : public AbstractionLayer_Base<AbstractionLayer_1_Properties>
|
2017-12-18 21:24:21 +01:00
|
|
|
{
|
|
|
|
public:
|
2017-12-22 22:55:55 +01:00
|
|
|
void PreProcessing(coor mySize, const vector<Part*>* partArray) final;
|
2017-12-20 22:05:04 +01:00
|
|
|
bool EvaluateQuality (const coor constraintCoordinate, qualityVector& qVector);
|
2017-12-18 21:24:21 +01:00
|
|
|
bool SetConstraintOnPosition(const coor constraintCoordinate, const AbstractionLayer_1_Properties constraint);
|
|
|
|
bool RemoveConstraintOnPosition(const coor constraintCoordinate);
|
2017-12-18 22:50:03 +01:00
|
|
|
bool PlaceOfPartGood(coor myCoor, uint8_t& myPart);
|
|
|
|
void shift(uint8_t& Part, int shifts);
|
2017-12-18 21:24:21 +01:00
|
|
|
void setEdgeZero();
|
|
|
|
|
|
|
|
|
|
|
|
bool CreateRandomPuzzle();
|
2017-12-20 17:35:52 +01:00
|
|
|
qualityVector returnInBox(vector<Part>& PuzzleBox);
|
2017-12-22 23:27:50 +01:00
|
|
|
void printConstraintMatrix();
|
2017-12-18 21:24:21 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //SOURCE_ABSTRACTIONLAYER_1_H
|