/Users/huttone/Devel/sedflux-new/sedflux/trunk/ew/utils/eh_input_val.h File Reference

#include <glib.h>
#include <utils/eh_types.h>

Go to the source code of this file.

Defines

#define EH_INPUT_VAL_ERROR   eh_input_val_error_quark()

Enumerations

enum  Eh_input_val_error {
  EH_INPUT_VAL_ERROR_NOT_TWO_COLUMNS, EH_INPUT_VAL_ERROR_X_NOT_MONOTONIC, EH_INPUT_VAL_ERROR_F_NOT_MONOTONIC, EH_INPUT_VAL_ERROR_BAD_F_RANGE,
  EH_INPUT_VAL_ERROR_NOT_TWO_DIST_VALS, EH_INPUT_VAL_ERROR_BAD_DIST_KEY
}
enum  Eh_input_val_type {
  EH_INPUT_VAL_SCALAR, EH_INPUT_VAL_FILE, EH_INPUT_VAL_RAND_UNIFORM, EH_INPUT_VAL_RAND_NORMAL,
  EH_INPUT_VAL_RAND_WEIBULL, EH_INPUT_VAL_RAND_USER
}

Functions

 new_handle (Eh_input_val)
Eh_input_val eh_input_val_new ()
Eh_input_val eh_input_val_destroy (Eh_input_val val)
Eh_input_val eh_input_val_set (const char *input_str, GError **err)
double eh_input_val_eval (Eh_input_val val,...)


Define Documentation

#define EH_INPUT_VAL_ERROR   eh_input_val_error_quark()

Definition at line 20 of file eh_input_val.h.

Referenced by eh_input_val_set().


Enumeration Type Documentation

enum Eh_input_val_error

Enumerator:
EH_INPUT_VAL_ERROR_NOT_TWO_COLUMNS 
EH_INPUT_VAL_ERROR_X_NOT_MONOTONIC 
EH_INPUT_VAL_ERROR_F_NOT_MONOTONIC 
EH_INPUT_VAL_ERROR_BAD_F_RANGE 
EH_INPUT_VAL_ERROR_NOT_TWO_DIST_VALS 
EH_INPUT_VAL_ERROR_BAD_DIST_KEY 

Definition at line 9 of file eh_input_val.h.

enum Eh_input_val_type

The ways an Eh_input_val is obtained

Enumerator:
EH_INPUT_VAL_SCALAR  The value is time-invarient.
EH_INPUT_VAL_FILE  The value is given as a function of time from a user-specified file.
EH_INPUT_VAL_RAND_UNIFORM  The value is drawn from a uniform distribution.
EH_INPUT_VAL_RAND_NORMAL  The value is drawn from a normal distribution.
EH_INPUT_VAL_RAND_WEIBULL  The value is drawn from a weibul distribution.
EH_INPUT_VAL_RAND_USER  The value is drawn from a user-defined distribution.

Definition at line 24 of file eh_input_val.h.


Function Documentation

Eh_input_val eh_input_val_destroy ( Eh_input_val  val  ) 

Destroy an Eh_input_val

Parameters:
val An Eh_input_val that was created with eh_create_input_val.
See also:
eh_create_input_val.

Definition at line 58 of file eh_input_val.c.

References eh_free.

Referenced by bio_destroy(), destroy_avulsion(), destroy_bioturbation(), destroy_constants(), destroy_diffusion(), destroy_plume_hypo(), destroy_storm(), and destroy_xshore().

double eh_input_val_eval ( Eh_input_val  val,
  ... 
)

Evaluate an Eh_input_val

Parameters:
val An initialized Eh_input_val
... Extra parameter for a time value if val is set to read from a time series.
Returns:
The new value

Definition at line 239 of file eh_input_val.c.

References EH_INPUT_VAL_FILE, EH_INPUT_VAL_RAND_NORMAL, EH_INPUT_VAL_RAND_UNIFORM, EH_INPUT_VAL_RAND_USER, EH_INPUT_VAL_RAND_WEIBULL, eh_rand_normal(), eh_rand_user(), eh_rand_weibull(), eh_require, and interpolate().

Referenced by bio_run(), run_avulsion(), run_bioturbation(), run_constants(), run_diffusion(), run_plume_hypo(), run_xshore(), and storm_func_user().

Eh_input_val eh_input_val_new (  ) 

Create an Eh_input_val

Returns:
A new Eh_input_val. Should be destroyed with eh_input_val_destroy.
See also:
eh_destroy_input_val.

Definition at line 31 of file eh_input_val.c.

References NEW_OBJECT.

Referenced by eh_input_val_set().

Eh_input_val eh_input_val_set ( const char *  input_str,
GError **  err 
)

Create an Eh_input_val with a value

The Eh_input_val can be initialized to be one of:

Parameters:
input_str An initialization string for the Eh_input_val
err Location of a GError to indicate and error (or NULL)
Returns:
A new (initialized) Eh_input_val, or NULL if an error occured

Definition at line 96 of file eh_input_val.c.

References eh_dbl_array_is_monotonic_up(), eh_dlm_read_swap(), eh_free_2, EH_INPUT_VAL_ERROR, EH_INPUT_VAL_ERROR_BAD_DIST_KEY, EH_INPUT_VAL_ERROR_BAD_F_RANGE, EH_INPUT_VAL_ERROR_F_NOT_MONOTONIC, EH_INPUT_VAL_ERROR_NOT_TWO_COLUMNS, EH_INPUT_VAL_ERROR_NOT_TWO_DIST_VALS, EH_INPUT_VAL_ERROR_X_NOT_MONOTONIC, EH_INPUT_VAL_FILE, eh_input_val_new(), EH_INPUT_VAL_RAND_NORMAL, EH_INPUT_VAL_RAND_UNIFORM, EH_INPUT_VAL_RAND_USER, EH_INPUT_VAL_RAND_WEIBULL, EH_INPUT_VAL_SCALAR, eh_require, eh_require_not_reached, and eh_return_val_if_fail.

Referenced by eh_symbol_table_input_value(), and init_plume_hypo().

new_handle ( Eh_input_val   ) 


Generated on Fri Jan 4 18:04:18 2008 for sedflux by  doxygen 1.5.2