/*Implementation of PStep_SeparationManager.h

It contains the member functions of PStep_SeparationManager10

*/

#include "PStep_SeparationManager.h"

//PStep_SeparationManager10:
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

//Constructor functions
//------------------------------------------------------------------------------------

//Basic constructor
PStep_SeparationManager10::PStep_SeparationManager10(PStep_AlgorithmMembers& InitAlgorithmMembers, PStep_SeparationAlgorithm* &InitCurrentSeparationAlgorithm)
	: PStep_SeparationManager(InitAlgorithmMembers, InitCurrentSeparationAlgorithm)
{
	//Initialize separator 1
	ListOfSeperationAlgorithm1s.emplace_front(AlgorithmMembers);
	//Initialize separator 9
	ListOfSeperationAlgorithm9s.emplace_front(AlgorithmMembers);
	//Set current separator
	CurrentSeparationAlgorithm = &ListOfSeperationAlgorithm9s.front();
}

//Manage
//------------------------------------------------------------------------------------

//Set current separator to SeperationAlgorithm8
void PStep_SeparationManager10::Manage(){

	//Obtain the depth of the current tree node
	int Depth = AlgorithmMembers.CurrentTreeNode->Depth;

	//Check whether the current node is the rootnode
	if (Depth == 1){
		//The current tree node is the rootnode,
		//set current separator to SeparationAlgorithm9
		CurrentSeparationAlgorithm = &ListOfSeperationAlgorithm9s.front();
	}
	else{
		//The current tree node is not the rootnode,
		//set current separator to SeparationAlgorithm1
		CurrentSeparationAlgorithm = &ListOfSeperationAlgorithm1s.front();
	}

}
