SciLib.Util
Class Util

java.lang.Object
  extended by SciLib.Util.Util

public final class Util
extends java.lang.Object

This class contains some methods to read and write a text file.


Constructor Summary
Util()
           
 
Method Summary
static java.text.DecimalFormat format(int n)
          Construct a DecimalFormat with n decimal digits
static byte[] generateByteVector(java.lang.String tmp)
          store data from a string in an integer array
static double[][] generateComplexVector(java.lang.String tmp)
          store data from a string in an double nx2 array of type complex
static int[] generateIntegerVector(java.lang.String tmp)
          store data from a string in an integer array
static double[] generateVector(java.lang.String tmp)
          store data from a string in an array of type double
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

format

public static final java.text.DecimalFormat format(int n)
Construct a DecimalFormat with n decimal digits

Parameters:
n - the number of decimal digits

generateIntegerVector

public static final int[] generateIntegerVector(java.lang.String tmp)
store data from a string in an integer array

Parameters:
tmp - A Data String
Returns:
An integer array

generateVector

public static final double[] generateVector(java.lang.String tmp)
store data from a string in an array of type double

Parameters:
tmp - A Data String
Returns:
A double array

generateComplexVector

public static final double[][] generateComplexVector(java.lang.String tmp)
store data from a string in an double nx2 array of type complex

Parameters:
tmp - A Data String
Returns:
A double nx2 array

generateByteVector

public static final byte[] generateByteVector(java.lang.String tmp)
store data from a string in an integer array

Parameters:
tmp - A Data String
Returns:
An integer array