org.jscience.mathematics.wavelet
Class SparseDiscreteFunction

java.lang.Object
  extended by org.jscience.mathematics.wavelet.MultiscaleFunction
      extended by org.jscience.mathematics.wavelet.DiscreteFunction
          extended by org.jscience.mathematics.wavelet.SparseDiscreteFunction
All Implemented Interfaces:
java.lang.Cloneable

public class SparseDiscreteFunction
extends DiscreteFunction
implements java.lang.Cloneable

DOCUMENT ME!


Field Summary
 DoubleSparseVector Data
          DOCUMENT ME!
 
Constructor Summary
SparseDiscreteFunction(double[] v)
          Creates a new SparseDiscreteFunction object.
 
Method Summary
 java.lang.Object clone()
          Return a copy of this object
 int dimension()
          Tells you how many samples you'll get from this function
 int dimension(int jfin)
          Tells you how many samples you'll get from this function (will not depend on the parameter)
 boolean equals(java.lang.Object a)
          Check if another object is equal to this DiscreteFunction object
 double[] evaluate()
          Return as an array the sampled values of the function
 double[] evaluate(int j1)
          Return as an array the sampled values of the function
 int getFilterType()
          This method is used to compute how the number of scaling functions changes from on scale to the other.
 double mass(double a, double b, int jfin)
          Compute the mass (integral)
 double norm()
          Compute the L2 norm of the signal
 double norm(int j)
          Compute the L2 norm of the function The parameter doesn't do anything.
 void normalize()
          Makes the L2norm of the internal array=1.
 void setData(double[] v)
          DOCUMENT ME!
 java.lang.String toString()
          Return a String representation of the object
 
Methods inherited from class org.jscience.mathematics.wavelet.MultiscaleFunction
mass
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Data

public DoubleSparseVector Data
DOCUMENT ME!

Constructor Detail

SparseDiscreteFunction

public SparseDiscreteFunction(double[] v)
Creates a new SparseDiscreteFunction object.

Parameters:
v - DOCUMENT ME!
Method Detail

toString

public java.lang.String toString()
Return a String representation of the object

Overrides:
toString in class DiscreteFunction
Returns:
DOCUMENT ME!

normalize

public void normalize()
Makes the L2norm of the internal array=1.

Overrides:
normalize in class DiscreteFunction

setData

public void setData(double[] v)
DOCUMENT ME!

Overrides:
setData in class DiscreteFunction
Parameters:
v - DOCUMENT ME!

evaluate

public double[] evaluate()
Return as an array the sampled values of the function

Overrides:
evaluate in class DiscreteFunction
Returns:
DOCUMENT ME!

equals

public boolean equals(java.lang.Object a)
Check if another object is equal to this DiscreteFunction object

Overrides:
equals in class DiscreteFunction
Parameters:
a - DOCUMENT ME!
Returns:
DOCUMENT ME!

evaluate

public double[] evaluate(int j1)
Return as an array the sampled values of the function

Overrides:
evaluate in class DiscreteFunction
Parameters:
j1 - number of iterations (doesn't do anything)
Returns:
DOCUMENT ME!

mass

public double mass(double a,
                   double b,
                   int jfin)
Compute the mass (integral)

Overrides:
mass in class DiscreteFunction
Parameters:
a - left boundary of the interval
b - right boundary of the interval
jfin - number of iterations to consider (precision)
Returns:
DOCUMENT ME!

norm

public double norm()
Compute the L2 norm of the signal

Overrides:
norm in class DiscreteFunction
Returns:
DOCUMENT ME!

norm

public double norm(int j)
Compute the L2 norm of the function The parameter doesn't do anything.

Overrides:
norm in class DiscreteFunction
Parameters:
j - number of iterations
Returns:
DOCUMENT ME!

clone

public java.lang.Object clone()
Return a copy of this object

Overrides:
clone in class DiscreteFunction
Returns:
DOCUMENT ME!

dimension

public int dimension(int jfin)
Tells you how many samples you'll get from this function (will not depend on the parameter)

Overrides:
dimension in class DiscreteFunction
Parameters:
jfin - DOCUMENT ME!
Returns:
DOCUMENT ME!

dimension

public int dimension()
Tells you how many samples you'll get from this function

Overrides:
dimension in class DiscreteFunction
Returns:
DOCUMENT ME!

getFilterType

public int getFilterType()
This method is used to compute how the number of scaling functions changes from on scale to the other. Basically, if you have k scaling function and a Filter of type t, you'll have 2k+t scaling functions at the next scale (dyadic case). Notice that this method assumes that one is working with the dyadic grid while the method "previousDimension" define in the interface "Filter" doesn't.

Overrides:
getFilterType in class DiscreteFunction
Returns:
DOCUMENT ME!