package qHullJNI;

import binaryMatrixFile.AsciiMatrixFile;
import binaryMatrixFile.BinaryMatrixFile;
import oneLiners.OneLiners;

public class QHullDelaunay {
	
	//static{ System.load("/usr/lib/qHullTriangulate.so"); }
	
	public static void main(String[] args) {
		double p[][] = AsciiMatrixFile.mustLoad("/tmp/points.txt", false);
		
		int i[][] = qHullTriangulate(p, true);
		
		System.out.println(i.length + " x " + i[0].length);
		
		BinaryMatrixFile.mustWrite("/tmp/idxs2.bin", OneLiners.intToDouble(i), false);
	}

	public static native int[][] qHullTriangulate(double points2D[][], boolean outputSummary);
	
}
