extThopt
Class Util

java.lang.Object
  extended by extThopt.Util

public abstract class Util
extends java.lang.Object

Abstract class defining a number of useful methods

This class should not be modified

Author:
Renaud GICQUEL

Constructor Summary
Util()
           
 
Method Summary
static java.lang.String aff_b(boolean b)
          displays a boolean affichage d'un booléen
static java.lang.String aff_d(double d)
          utility method displays a double affiche un double
static java.lang.String aff_d(double d, int dec)
          displays a double méthode de classe d'affichage d'un double sous forme de chaîne de caractère avec dec décimales
static java.lang.String aff_i(int i)
          utility method displays an integer affiche un entier
static boolean contains(java.util.Vector vComp, java.lang.String pureGas)
          utility method returns true if gas pureGas iis included in Vector vComp
static rg.corps.Corps createIdealGas(java.lang.String nomGaz)
          utility method creates an ideal gas
static double dicho_T(Inversable inv, double value, double param, java.lang.String function, double valMin, double valMax, double epsilon)
          generic function inversion method by dichotomy procédure générique d'inversion de fonction de T par dichotomie
static java.lang.String extr_value(java.lang.String s)
          utility method extracts the String at the right of the '=' character
static java.lang.String extr_value(java.lang.String ligne_data, java.lang.String search)
          utility method extracts the String at the right of the '=' character corresponding to the String search at the left of '=' from a spreadsheet line (tab separator)
static double getMax(double[] array)
           
static double getMin(double[] array)
           
static boolean lit_b(java.lang.String s)
          utility method reads a boolean lecture d'un booléen
static double lit_d(java.lang.String s)
          utility method reads a double lecture d'un double
static int lit_i(java.lang.String s)
          utility method reads an integer lecture d'un entier
static double molarComp(java.util.Vector vComp, java.lang.String pureGas)
          utility method extracts molar fraction relating to gas pureGas from composition Vector vComp
static int solveCubic(double[] eqn, double[] res)
           
static void updateMolarComp(java.util.Vector vComp, java.lang.String pureGas, double newFractMol)
          utility method updates the molar fraction relating to gas pureGas in composition Vector vComp
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

aff_i

public static java.lang.String aff_i(int i)
utility method

displays an integer

affiche un entier

Parameters:
i - integer
Returns:
String

lit_i

public static int lit_i(java.lang.String s)
utility method

reads an integer

lecture d'un entier

Parameters:
s - String
Returns:
integer

aff_b

public static java.lang.String aff_b(boolean b)
displays a boolean

affichage d'un booléen

Parameters:
b - boolean
Returns:
java.lang.String

aff_d

public static java.lang.String aff_d(double d)
utility method

displays a double

affiche un double

Parameters:
d - double
Returns:
String

aff_d

public static java.lang.String aff_d(double d,
                                     int dec)
displays a double

méthode de classe d'affichage d'un double sous forme de chaîne de caractère avec dec décimales

Parameters:
d - double
dec - number of decimals

lit_d

public static double lit_d(java.lang.String s)
utility method

reads a double

lecture d'un double

Parameters:
s - String
Returns:
double

lit_b

public static boolean lit_b(java.lang.String s)
utility method

reads a boolean

lecture d'un booléen

Parameters:
s - "true" or "false"
Returns:
boolean

extr_value

public static java.lang.String extr_value(java.lang.String s)
utility method extracts the String at the right of the '=' character

Parameters:
s - original String "value=3.4"
Returns:
java.lang.String

extr_value

public static java.lang.String extr_value(java.lang.String ligne_data,
                                          java.lang.String search)
utility method extracts the String at the right of the '=' character corresponding to the String search at the left of '=' from a spreadsheet line (tab separator)

Parameters:
ligne_data - original data line
search - String "value"
Returns:
java.lang.String

dicho_T

public static double dicho_T(Inversable inv,
                             double value,
                             double param,
                             java.lang.String function,
                             double valMin,
                             double valMax,
                             double epsilon)
generic function inversion method by dichotomy

procédure générique d'inversion de fonction de T par dichotomie

Parameters:
value - double
param - double
function - String
valMin - double
valMax - double
epsilon - double
Returns:
double

createIdealGas

public static rg.corps.Corps createIdealGas(java.lang.String nomGaz)
utility method creates an ideal gas

Parameters:
nomGas - String
Returns:
rg.corps.Corps

getMax

public static double getMax(double[] array)

getMin

public static double getMin(double[] array)

molarComp

public static double molarComp(java.util.Vector vComp,
                               java.lang.String pureGas)
utility method extracts molar fraction relating to gas pureGas from composition Vector vComp

Parameters:
vComp - Vector
pureGas - String
Returns:
double

updateMolarComp

public static void updateMolarComp(java.util.Vector vComp,
                                   java.lang.String pureGas,
                                   double newFractMol)
utility method updates the molar fraction relating to gas pureGas in composition Vector vComp

Parameters:
vComp - Vector
pureGas - String
newFractMol - double

contains

public static boolean contains(java.util.Vector vComp,
                               java.lang.String pureGas)
utility method returns true if gas pureGas iis included in Vector vComp

Parameters:
vComp - Vector
pureGas - String

solveCubic

public static int solveCubic(double[] eqn,
                             double[] res)