jass.generators
Class ModalModel

java.lang.Object
  extended by jass.generators.ModalModel
Direct Known Subclasses:
RandomModalModel

public class ModalModel
extends java.lang.Object

Modal model, which is loaded from an .sy format text file.

Author:
Kees van den Doel (kvdoel@cs.ubc.ca)

Field Summary
 float[][] a
          Gains.
 float ascale
          Multiplies all gains.
 float[] d
          Angular decay rates in Hertz.
 float dscale
          Multiplies all dampings.
 float[] f
          Mode frequencies in Hertz.
 float fscale
          Multiplies all frequencies.
 int nf
          Number of modes available.
 int nfUsed
          Number of modes used.
 int np
          Number of points.
 
Constructor Summary
ModalModel(int nf, int np)
          Constructor.
ModalModel(java.lang.String fn)
          Constructor.
ModalModel(java.net.URL url)
          Constructor.
 
Method Summary
protected  void allocate(int nf, int np)
          Allocated arrays.
 void readModes(java.lang.String fn)
          Read the modes file in .sy format.
 void readModes(java.net.URL url)
          Read the modes url in .sy format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

f

public float[] f
Mode frequencies in Hertz.


d

public float[] d
Angular decay rates in Hertz.


a

public float[][] a
Gains. a[p][k] is gain at point p for mode k.


nf

public int nf
Number of modes available.


nfUsed

public int nfUsed
Number of modes used.


np

public int np
Number of points.


fscale

public float fscale
Multiplies all frequencies.


dscale

public float dscale
Multiplies all dampings.


ascale

public float ascale
Multiplies all gains.

Constructor Detail

ModalModel

public ModalModel(java.lang.String fn)
           throws java.io.FileNotFoundException
Constructor.

Parameters:
fn - File name with modal data in .sy format.
Throws:
java.io.FileNotFoundException

ModalModel

public ModalModel(java.net.URL url)
           throws java.io.IOException
Constructor.

Parameters:
url - Url name with modal data in .sy format.
Throws:
java.io.IOException

ModalModel

public ModalModel(int nf,
                  int np)
Constructor. Just allocates data.

Parameters:
nf - number of modes.
np - numpber of locations.
Method Detail

allocate

protected void allocate(int nf,
                        int np)
Allocated arrays.

Parameters:
nf - number of modes.
np - number of locations.

readModes

public void readModes(java.lang.String fn)
               throws java.io.FileNotFoundException
Read the modes file in .sy format.

Parameters:
fn - File name with modal data in .sy format.
Throws:
java.io.FileNotFoundException

readModes

public void readModes(java.net.URL url)
               throws java.io.IOException
Read the modes url in .sy format.

Parameters:
url - URL name with modal data in .sy format.
Throws:
java.io.IOException