// RecogCore.h: interface for the CJamoBNCore class.
//
//////////////////////////////////////////////////////////////////////


class CJamoBNCore  
{
public:
	CJamoBNCore();
	virtual ~CJamoBNCore();

private:
	int m_path[MAXSTROKENUM][MAXSAMNUM][MAXSTROKENUM];
	float m_dis[MAXSTROKENUM][MAXSAMNUM];
	BOOL m_flag[MAXSTROKENUM][MAXSAMNUM];


	BOOL	SaveBN(JAMOBN *pBN, FILE *file);

	BOOL	InitBN(JAMOBN *pBN,int strokeNum,int JamoId,int GrpId);
	BOOL	CreateParentLink(JAMOBN *pBN);

	float	ForwardStroke(JAMOBN *pBN, int StrokeId,int deep=3);
	float	ForwardBN(JAMOBN *pBN,int deep=3);

	BOOL	SetDataInBN(JAMOBN *pBN,REC_POINT* pPts,int* pSelNo,int SelNum);
	void	SetDataInStroke(JAMOBN *pBN, int StrokeId,REC_POINT* pPts,int st,int ed,int deep=3);
	void	SetEndDataInStroke(JAMOBN *pBN, int StrokeId,REC_POINT* pPts,int st,int ed);

public:
	BOOL	LoadBN(JAMOBN* pBN,FILE* file);
	BOOL	deleteBN(JAMOBN *pBN);
	float	ForwardBN(JAMOBN *pBN,REC_POINT* pPts,int* pSamProp,int* pSamNo,int SamNum,int& Mistake,int deep=3);
	


};

