edu.ucla.util
Class LinearFunction

Object
  extended by LinearFunction

public class LinearFunction
extends Object

Represents a function c_0 + c_1 x_1 + ... + c_n x_n


Constructor Summary
LinearFunction(String name, Object[] arguments, double constant, double[] coefficients)
           
 
Method Summary
 LinearFunction add(LinearFunction function)
           
 LinearFunction combine(Object[] newArguments, double[][] combinators)
          Old number of arguments = combinators[i].length
 Object[] getArguments()
           
 double[] getCoefficients()
           
 double getConstant()
           
 String getName()
           
 LinearFunction multiply(double k)
           
 double output(double[] inputs)
           
 LinearFunction project(LinearFunction function, List indices)
          Projects onto a subset of arguments
 LinearFunction subtract(LinearFunction function)
           
 String toString()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinearFunction

public LinearFunction(String name,
                      Object[] arguments,
                      double constant,
                      double[] coefficients)
Method Detail

getName

public String getName()

getArguments

public Object[] getArguments()

getConstant

public double getConstant()

getCoefficients

public double[] getCoefficients()

output

public double output(double[] inputs)

toString

public String toString()
Overrides:
toString in class Object

multiply

public LinearFunction multiply(double k)

add

public LinearFunction add(LinearFunction function)

subtract

public LinearFunction subtract(LinearFunction function)

project

public LinearFunction project(LinearFunction function,
                              List indices)
Projects onto a subset of arguments


combine

public LinearFunction combine(Object[] newArguments,
                              double[][] combinators)
Old number of arguments = combinators[i].length



Copyright 2010 UCLA Automated Reasoning Group