us.ihmc.utilities.math
Class LinearMapping

java.lang.Object
  extended by us.ihmc.utilities.math.LinearMapping

public class LinearMapping
extends java.lang.Object

Title: LinearMapping

Description: Defines a mapping from an n dimensional input space to an n dimensional output space, where the transformation between the two is a simple scaling of each dimension.

Copyright: Copyright (c) 2007

Company: IHMC

Version:
1.0
Author:
jrebula

Constructor Summary
LinearMapping(java.util.ArrayList<double[]> inputDimensions, java.util.ArrayList<double[]> outputDimensions)
          Creates a mapping in n space to another n space that performs a simple scale in each dimension
 
Method Summary
 double[] mapFromInputSpaceToOutputSpace(double[] input)
           
 void mapFromInputSpaceToOutputSpacePacked(double[] input, double[] output)
          Takes a vector in the input space, and copies the mapped vector in the output space into the supplied output array.
 double[] mapFromOutputSpaceToInputSpace(double[] output)
           
 void mapFromOutputSpaceToInputSpacePacked(double[] input, double[] output)
          Takes a vector in the output space, and copies the mapped vector in the input space into the supplied input array.
static LinearMapping readIn(java.io.BufferedReader bufferedReader)
           
 void writeOut(java.io.PrintWriter printWriter)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearMapping

public LinearMapping(java.util.ArrayList<double[]> inputDimensions,
                     java.util.ArrayList<double[]> outputDimensions)
Creates a mapping in n space to another n space that performs a simple scale in each dimension

Parameters:
inputDimensions - ArrayList list of length n, each element is a double array of length two, containing the min and max values for that dimension in the input space
outputDimensions - ArrayList list of length n, each element is a double array of length two, containing the min and max values for that dimension in the output space
Method Detail

mapFromInputSpaceToOutputSpace

public double[] mapFromInputSpaceToOutputSpace(double[] input)

writeOut

public void writeOut(java.io.PrintWriter printWriter)

readIn

public static LinearMapping readIn(java.io.BufferedReader bufferedReader)
                            throws java.io.IOException
Throws:
java.io.IOException

mapFromInputSpaceToOutputSpacePacked

public void mapFromInputSpaceToOutputSpacePacked(double[] input,
                                                 double[] output)
Takes a vector in the input space, and copies the mapped vector in the output space into the supplied output array.

Parameters:
input - double[]
output - double[]

mapFromOutputSpaceToInputSpace

public double[] mapFromOutputSpaceToInputSpace(double[] output)

mapFromOutputSpaceToInputSpacePacked

public void mapFromOutputSpaceToInputSpacePacked(double[] input,
                                                 double[] output)
Takes a vector in the output space, and copies the mapped vector in the input space into the supplied input array. Note that the ordering of the arguments is (input, output)

Parameters:
input - double[]
output - double[]