/**********************************************************************
 
	Copyright (C) 2005- Hirohisa MORI <joshua@nichibun.ac.jp>
 
	This program is free software; you can redistribute it 
	and/or modify it under the terms of the GLOBALBASE 
	Library General Public License (G-LGPL) as published by 

	http://www.globalbase.org/
 
	This program is distributed in the hope that it will be 
	useful, but WITHOUT ANY WARRANTY; without even the 
	implied warranty of MERCHANTABILITY or FITNESS FOR A 
	PARTICULAR PURPOSE.

**********************************************************************/

#include	"k2m.h"

#define MDH(v)	((MATRIX_DATA_HEADER*)(v))


unsigned char *
k_ix(void * v,int x,int y)
{
int ix[3];
	ix[0] = 0;
	ix[1] = x;
	ix[2] = y;
	return ((unsigned char*)v) + MDH(v)->offset +
		get_seq_from_ix(&ix[0],(int*)(MDH(v)+1),MDH(v)->dim);
}

