#pragma once
#pragma warning(disable: 4312 4311)
#include <vector>

using namespace std;

typedef vector<uint> Node_Parents;

class Node
{
public:

	uint var_id, node_id;
	Node* hi, *lo;
	Node_Parents parents;

	static uint id_cnt;

	Node(uint id)
	{
		this->var_id=id; hi = lo = NULL;
		node_id = uint(this);//id_cnt++;
	}

	Node(uint id, Node* h, Node* l)
	{
		node_id = uint(this);//id_cnt++;
		this->var_id=id;
		hi = h;
		lo = l;
	}


	bool rem_parent(uint n_id);
	bool is_parent(uint n_id);
	bool is_term(){return (var_id<=TERM_X)? true:false;}
};