SYNOPSIS

Data Structures

struct hs_config_t

configuration structure to use custom settings in hyantes fuctions struct hs_potential

structure containing the coordinate of a potential all coordiante are given in radians which means that struct hs_coord

structure containing the coordinates of an area all coordinate are given in degree which means that -90 <= latitude <= 90 and -180 <= longitude <= +180

Defines

#define INPUT_FORMAT '%lf%*[ \t]%lf%*[ \t]%lf'

#define OUTPUT_FORMAT '%lf %lf %lf\n'

#define COS cos

#define SIN sin

#define ACOS acos

Typedefs

typedef double data_t

typedef struct hs_potential hs_potential_t

structure containing the coordinate of a potential all coordiante are given in radians which means that typedef struct hs_coord hs_coord_t

structure containing the coordinates of an area all coordinate are given in degree which means that -90 <= latitude <= 90 and -180 <= longitude <= +180

Enumerations

enum smoothing_fun_t { F_DISK, F_AMORTIZED_DISK, F_GAUSSIAN, F_EXPONENTIAL, F_PARETO }

enumeration of all available smoothing functions enum hs_option_t { HS_PARSE_ONLY, HS_THRESHOLD, HS_LOAD_RAW, HS_LOAD_PRECOMPUTED, HS_SMOOTH_FUNC, HS_MODULE_OPT }

enumeration of various options for hyantes

Functions

void hs_display (size_t rangex, size_t rangey, hs_potential_t pt[rangex][rangey])

int hs_set_r (hs_config_t *, hs_option_t,...)

sets the given option to the given parameters in the given configuration int hs_set (hs_option_t,...)

sets the given option to the given parameters in the default configuration (deprecated, you should use your own configuration structure) hs_potential_t * hs_smooth (int _reoLat, int _resoLon, hs_coord_t visu, FILE *pFileReference)

performs the smoothing of target area inside visu, using potentials from pFileReference the smoothing is performed using smoothing method given by hs_set(HS_SMOOTH_FUNC, ... ) the resolution of the output matrix will be resoLat x resoLon hs_potential_t * hs_smooth_r (int _reoLat, int _resoLon, hs_coord_t visu, FILE *pFileReference, hs_config_t *config)

performs the smoothing of target area inside visu, using potentials from pFileReference and using given hs_config the smoothing is performed using smoothing method acording to the configuration given in the arguments the resolution of the output matrix will be resoLat x resoLon hs_potential_t * hs_smoothing (int _resoLat, int _resoLon, const char *function_name, double function_param, hs_coord_t visu, FILE *pFileReference)

perform the smoothing of target area inside visu, using potentials from pFileReference the smoothing is performed using function_name smoothing method, with a radius of function_param the resolution of the output matrix will be resoLat x resoLon (obsolete function, use hs_smmoth_r instead) unsigned long hs_status ()

observer of the execution of the computation const char ** hs_list_smoothing (size_t *sz)

list all available smoothing methods that can be configured using hs_config

Detailed Description

hyantes.c header

Author:

Sebastien Martinez and Serge Guelton

Date:

2011-06-01

This file is part of hyantes.

hyantes is free software; you can redistribute it and/or modify it under the terms of the CeCILL-C License

You should have received a copy of the CeCILL-C License along with this program. If not, see <http://www.cecill.info/licences>.

Definition in file hyantes.h.

Typedef Documentation

typedef struct \fBhs_potential\fP \fBhs_potential_t\fP

structure containing the coordinate of a potential all coordiante are given in radians which means that -90 <= latitude <= +90 and -180 <= longitude <= +180

Enumeration Type Documentation

enum \fBhs_option_t\fP

enumeration of various options for hyantes

Enumerator:

HS_PARSE_ONLY

(deprecated) only require generation of precomputed quadtree, extra arg : 'char *filename'

HS_THRESHOLD

(deprecated) set the threshold used for ignoring some area, extra arg: 'double threshold'

HS_LOAD_RAW

(deprecated) tells the library to consider input file as a raw data file, no extra arg

HS_LOAD_PRECOMPUTED

(deprecated) tells the library to consider input file as a precomputed file, no extra arg

HS_SMOOTH_FUNC

tells the library to use given function and param to perform smoothing, extra arg: "char *funcname, double extra param, ...

HS_MODULE_OPT

(deprecated) pass option to module

Definition at line 61 of file hyantes.h.

enum \fBsmoothing_fun_t\fP

enumeration of all available smoothing functions

Enumerator:

F_DISK

Disk smoothing method

F_AMORTIZED_DISK

smoothing method amortizing potential

F_GAUSSIAN

smoothing method using gaussian distribution

F_EXPONENTIAL

smoothing method using exponential distribution

F_PARETO

smoothing method using pareto distribution

Definition at line 48 of file hyantes.h.

Function Documentation

const char** \fBhs_list_smoothing\fP (size_t *sz)

list all available smoothing methods that can be configured using hs_config Parameters:

pointer to the number of smoothing methods

Returns:

array of string constant of size *sz. Memory is still owned by hyantes

Definition at line 219 of file hyantes.c.

References func_names.

Referenced by vhs_set_r().

int \fBhs_set\fP (\fBhs_option_t\fPopt, ...)

sets the given option to the given parameters in the default configuration (deprecated, you should use your own configuration structure) Parameters:

opt option to set

... list of arguments

Returns:

1 if setting went well, 0 otherwise

Definition at line 96 of file options.c.

References vhs_set_r().

int \fBhs_set_r\fP (\fBhs_config_t\fP *config, \fBhs_option_t\fPopt, ...)

sets the given option to the given parameters in the given configuration Parameters:

config pointer to the configuration to use

opt option to set

... list of arguments

Returns:

1 if setting went well, 0 otherwise

Definition at line 82 of file options.c.

References vhs_set_r().

Referenced by hs_smoothing().

\fBhs_potential_t\fP* \fBhs_smooth\fP (int_resoLat, int_resoLon, \fBhs_coord_t\fPvisu, FILE *pFileReference)

performs the smoothing of target area inside visu, using potentials from pFileReference the smoothing is performed using smoothing method given by hs_set(HS_SMOOTH_FUNC, ... ) the resolution of the output matrix will be resoLat x resoLon Parameters:

_resoLat number of latitude points computed

_resoLon number of longitude points computed

visu visualization window

pFileReference file containg the data in the format latitude longitude potential latitude longitude potential ... latitude longitude potential where latitude and longitude are given in degrees

Returns:

an allocated array of size resoLat x resoLon containing a struct (lat, lon, pot) or NULL if an error occured

Definition at line 209 of file hyantes.c.

References hs_smooth_r().

\fBhs_potential_t\fP* \fBhs_smooth_r\fP (int_resoLat, int_resoLon, \fBhs_coord_t\fPvisu, FILE *pFileReference, \fBhs_config_t\fP *configuration)

performs the smoothing of target area inside visu, using potentials from pFileReference and using given hs_config the smoothing is performed using smoothing method acording to the configuration given in the arguments the resolution of the output matrix will be resoLat x resoLon Parameters:

_resoLat number of latitude points computed

_resoLon number of longitude points computed

visu visualization window

pFileReference file containg the data in the format latitude longitude potential latitude longitude potential ... latitude longitude potential where latitude and longitude are given in degrees

configuration configuration to use

Returns:

an allocated array of size resoLat x resoLon containing structs (lat, lon, pot) or NULL if an error occured

Definition at line 252 of file hyantes.c.

References do_run(), hs_config_t::herrno, hs_read_towns(), hs_coord::mLat, hs_coord::MLat, hs_coord::mLon, and hs_coord::MLon.

Referenced by hs_smooth(), and hs_smoothing().

\fBhs_potential_t\fP* \fBhs_smoothing\fP (int_resoLat, int_resoLon, const char *function_name, doublefunction_param, \fBhs_coord_t\fPvisu, FILE *pFileReference)

perform the smoothing of target area inside visu, using potentials from pFileReference the smoothing is performed using function_name smoothing method, with a radius of function_param the resolution of the output matrix will be resoLat x resoLon (obsolete function, use hs_smmoth_r instead) Parameters:

_resoLat number of latitude points computed

_resoLon number of longitude points computed

function_name name of a smoothing method listed by hs_list_smoothing

parameter (in kilometers) of the smoothing method

visu visualization window

file containg the data in the format latitude longitude potential latitude longitude potential ... latitude longitude potential where latitude and longitude are given in degrees

Returns:

an allocated array of size resoLat x resoLon containing structs (lat, lon, pot)

Definition at line 302 of file hyantes.c.

References hs_set_r(), HS_SMOOTH_FUNC, and hs_smooth_r().

unsigned long \fBhs_status\fP ()

observer of the execution of the computation Returns:

number of computed input potential points from the beginning of the computation

Definition at line 228 of file hyantes.c.

References hs_config_t::status.

Author

Generated automatically by Doxygen for Hyantes from the source code.