/**************************************************************************** Copyright (c) 2003, Landmark Graphics and others. All rights reserved. This program and accompanying materials are made available under the terms of the Common Public License - v1.0, which accompanies this distribution, and is available at http://www.eclipse.org/legal/cpl-v10.html ****************************************************************************/ package edu.mines.jtk.opt.test; import java.util.Arrays; import junit.framework.TestCase; import junit.framework.TestSuite; import edu.mines.jtk.opt.CoordinateTransform; import edu.mines.jtk.util.Almost; import static edu.mines.jtk.util.ArrayMath.copy; /** Wrap edu.mines.jtk.opt.CoordinateTransform for junit testing. (junit.jar must be in CLASSPATH) */ public class CoordinateTransformTest extends TestCase { /** Test CoordinateTransform class @throws Exception */ public void testAll() throws Exception { double[][] in = new double[][] { {1.,1.}, {2.,2.}, {3.,4.}, }; double[][] out = new double[][] { {2.}, {4.}, {7.}, }; double[][] inCopy = copy(in); double[][] outCopy = copy(out); CoordinateTransform ls = new CoordinateTransform(1, 2); for (int j=0; j