Libbarrett
1.2.4
|
#include <libconfig.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_matrix.h>
Go to the source code of this file.
Functions | |
int | bt_gsl_cross (gsl_vector *a, gsl_vector *b, gsl_vector *res) |
char * | bt_gsl_vector_sprintf (char *buffer, gsl_vector *vector) |
int | bt_gsl_config_get_double (config_setting_t *setting, double *result) |
int | bt_gsl_config_double_from_group (config_setting_t *grp, char *name, double *result) |
int | bt_gsl_fill_vector_cfggroup (gsl_vector *vec, config_setting_t *parent, const char *name) |
int | bt_gsl_fill_vector_cfgarray (gsl_vector *vec, config_setting_t *array) |
int | bt_gsl_fill_vector (gsl_vector *vec,...) |
int | bt_gsl_fill_matrix (gsl_matrix *mat, config_setting_t *parent, const char *name) |
Definition of a set of GSL helper functions, including the cross-product vector formatting, and libconfig parsing functions.
int bt_gsl_config_double_from_group | ( | config_setting_t * | grp, |
char * | name, | ||
double * | result | ||
) |
Retrieve a double from a named setting in a libconfig group.
[in] | grp | The group to use |
[in] | name | The name of the setting to find |
[out] | result | The location into which to save the value |
0 | Success |
-1 | The named setting does not exist |
-2 | The setting's value is not convertable to double |
int bt_gsl_config_get_double | ( | config_setting_t * | setting, |
double * | result | ||
) |
Retrieve a double from a libconfig setting.
[in] | setting | The setting to use |
[out] | result | The location into which to save the value |
0 | Success |
-1 | The setting does not exist |
-2 | The setting's value is not convertable to double |
int bt_gsl_cross | ( | gsl_vector * | a, |
gsl_vector * | b, | ||
gsl_vector * | res | ||
) |
Copyright 2009-2014 Barrett Technology <support@barrett.com>
This file is part of libbarrett.
This version of libbarrett is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This version of libbarrett is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this version of libbarrett. If not, see <http://www.gnu.org/licenses/>.
Barrett Technology Inc. 73 Chapel Street Newton, MA 02458 Perform a vector cross-product, res += a x b.
[in] | a | First vector |
[in] | b | Second vector (to be crossed into a) |
[out] | res | Result vector to add to |
0 | Success |
Copyright 2009-2014 Barrett Technology <support@barrett.com>
This file is part of libbarrett.
This version of libbarrett is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This version of libbarrett is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this version of libbarrett. If not, see <http://www.gnu.org/licenses/>.
Barrett Technology Inc. 73 Chapel Street Newton, MA 02458
int bt_gsl_fill_matrix | ( | gsl_matrix * | mat, |
config_setting_t * | parent, | ||
const char * | name | ||
) |
Fill a matrix from a libconfig list of arrays or lists.
[out] | mat | The matrix to fill |
[in] | parent | The group to use |
[in] | name | The name of the array or list in the parent |
0 | Success |
-1 | The named setting does not exist, or is not a list of arrays or lists with the same dimensions as the matrix |
-2 | At least one of the read values is not convertable to double |
int bt_gsl_fill_vector_cfggroup | ( | gsl_vector * | vec, |
config_setting_t * | parent, | ||
const char * | name | ||
) |
Fill a vector from a libconfig array or list.
[out] | vec | The vector to fill |
[in] | parent | The group to use |
[in] | name | The name of the array or list in the parent |
0 | Success |
-1 | The named setting does not exist, or is not an array or list with the same length as the vector |
-2 | At least one of the array or list's values is not convertable to double |
char* bt_gsl_vector_sprintf | ( | char * | buffer, |
gsl_vector * | vector | ||
) |
Format the vector into the buffer.
The format used is "<aaa.aaaa,bbb.bbbb,ccc.cccc>", with vector values specified by the format string %8.4f.
[out] | buffer | The character buffer to write the result to |
[in] | vector | The vector to format |