---
name: "hs_option_t"
section: "3"
platform: "linux"
package: "libhyantes-dev"
version: "1.3.0-1.1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/hyantes.h"
---

# hs\_option\_t(3)

hyantes.c header

Part of [hyantes.h(3)](/hyantes.h/3.md).

## NAME

/home/serge/sources/hyantes/src/hyantes.h -

**hyantes.c** header

## 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 hs\_potential hs\_potential\_t

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 hs\_option\_t

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 smoothing\_fun\_t

*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\*\* hs\_list\_smoothing (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 hs\_set (hs\_option\_topt, ...)

*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 hs\_set\_r (hs\_config\_t \*config, hs\_option\_topt, ...)

*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().*

### hs\_potential\_t\* hs\_smooth (int\_resoLat, int\_resoLon, hs\_coord\_tvisu, 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().*

### hs\_potential\_t\* hs\_smooth\_r (int\_resoLat, int\_resoLon, hs\_coord\_tvisu, FILE \*pFileReference, hs\_config\_t \*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().*

### hs\_potential\_t\* hs\_smoothing (int\_resoLat, int\_resoLon, const char \*function\_name, doublefunction\_param, hs\_coord\_tvisu, 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 hs\_status ()

*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.*
