Classes | Namespaces
acolm.h File Reference

The o2scl_acol::acol_manager class header. More...

#include <iostream>
#include <string>
#include <vector>
#include <fnmatch.h>
#include <o2scl/misc.h>
#include <o2scl/cli.h>
#include <o2scl/fit_nonlin.h>
#include <o2scl/table_units.h>
#include <o2scl/table3d.h>
#include <o2scl/format_float.h>
#include <o2scl/hdf_file.h>
#include <o2scl/hdf_io.h>
#include <o2scl/lib_settings.h>
#include <o2scl/contour.h>
#include <o2scl/tensor_grid.h>
#include <o2scl/uniform_grid.h>
#include <o2scl/slack_messenger.h>

Go to the source code of this file.

Classes

class  o2scl_acol::acol_manager
 The driver for 'acol' command-line utility. More...
 

Namespaces

 o2scl_acol
 A namespace for objects associated with the command-line utility 'acol'.
 

Functions

Functions to integrate o2scl_acol::acol_manager with python
void * o2scl_create_acol_manager ()
 Create an o2scl_acol::acol_manager object. More...
 
void o2scl_free_acol_manager (void *vp)
 Free memory associated with a o2scl_acol::acol_manager object. More...
 
void o2scl_acol_alias_counts (void *vp, int n_entries, int *sizes, char *str, int &n_new, int &s_new)
 Using the commands stored in (n_entries,sizes,str), apply the aliases stored in the o2scl::cli object and return the counts (n_new,s_new) for memory allocation. More...
 
void o2scl_acol_apply_aliases (void *vp, int n_entries, int *sizes, char *str, int *sizes_new, char *str_new)
 Using the commands stored in (n_entries,sizes,str), apply the aliases stored in the o2scl::cli object and place them in the pre-allocated arrays sizes_new and str_new. More...
 
void o2scl_acol_set_names (void *vp, int n1, char *cmd_name, int n2, char *short_desc, int n3, char *env_var)
 Set the command name, the short description, and the environment variable name. More...
 
int o2scl_acol_tensor_to_table3d (void *vp, int i1, int i2)
 Convert a rank 2 o2scl::tensor (with data types double, int, or size_t) or o2scl::tensor_grid object to a o2scl::table3d object. More...
 
std::vector< std::string > o2scl_acol_parse_arrays (int n_entries, int *sizes, char *str)
 Construct a string vector from the data in n_entries, sizes, and str. More...
 
void o2scl_acol_parse (void *vp, int n_entries, int *sizes, char *str)
 Parse the set of commands in n_entries, sizes and str. More...
 
int o2scl_acol_get_column (void *vp, char *col_name, int &n, double *&ptr)
 Return the size and a pointer to the column named col_name in a o2scl::table object. More...
 
int o2scl_acol_get_row_ser (void *vp, char *parttern, int row_index, int &n, double *&ptr)
 Return the size and a pointer to the row with index row_index in a o2scl::table object. More...
 
int o2scl_acol_get_double_arr (void *vp, int &n, double *&ptr)
 Return the size and a pointer to a double array corresponding to a int[], size_t[], or double[] object. More...
 
int o2scl_acol_get_tensor_grid3 (void *vp, int &nx, int &ny, int &nz, const double *&xg, const double *&yg, const double *&zg, const double *&data)
 Return the sizes, grid, and data pointer for a rank 3 o2scl::tensor_grid object. More...
 
int o2scl_acol_get_hist_reps (void *vp, int &n, double *&ptr)
 Return the size and a pointer to the column named col_name in a o2scl::table object. More...
 
int o2scl_acol_get_hist_wgts (void *vp, int &n, double *&ptr)
 Return the size and a pointer to the column named col_name in a o2scl::table object. More...
 
int o2scl_acol_pdma_get_base (void *vp, int &ndim, int &n, double *&low, double *&high)
 Return the dimensionality, mesh size, and lower and upper limits for a o2scl::prob_dens_mdim_amr object. More...
 
int o2scl_acol_pdma_get_cube (void *vp, int ix, double *&low, double *&high, double &frac_vol, double &weight)
 Return the lower and upper limits, fractional volume, and weight for the o2scl::prob_dens_mdim_amr::hypercube object of index ix. More...
 
int o2scl_acol_contours_n (void *vp)
 Return the number of contour lines associated with the current contour line vector object. More...
 
double o2scl_acol_contours_line (void *vp, int i, int &n, double *&ptrx, double *&ptry)
 For the current contour line vector object, set the pointers to the x- and y-values in the contour lines and return the contour level.
 
void o2scl_acol_get_type (void *vp, int &n, char *&str)
 Return the type of the current object. More...
 
int o2scl_acol_get_slice (void *vp, char *slice_name, int &nx, double *&xptr, int &ny, double *&yptr, double *&data)
 Return the size and a pointer to the slice named sl_name in a o2scl::table object. More...
 
int o2scl_acol_get_hist_2d (void *vp, int &nx, double *&xptr, int &ny, double *&yptr, double *&data)
 For a two-dimensional histogram, return the bin edges, number of bins in both directions, and the weights in each bin. More...
 
int o2scl_acol_mult_vectors_to_conts (void *vp, char *str1, char *str2)
 Convert two multiple vector specifications to the a list of o2scl::contour_line objects. More...
 

Function Documentation

◆ o2scl_acol_alias_counts()

void o2scl_acol_alias_counts ( void *  vp,
int  n_entries,
int *  sizes,
char *  str,
int &  n_new,
int &  s_new 
)

This function is used in O2sclpy in o2graph_plotter::parse_argv() to process aliases in the o2graph executable. It converts the input data to a vector<string> object, applies any aliases stored in the o2scl::cli (or o2scl::cli_readline) object, and then counts the new number of arguments (n_new) and string length for all arguments (s_new). These counts are used to allocate memory in Python in o2graph_plotter::parse_argv() in order to prepare for a call to o2scl_acol_apply_aliases() .

◆ o2scl_acol_apply_aliases()

void o2scl_acol_apply_aliases ( void *  vp,
int  n_entries,
int *  sizes,
char *  str,
int *  sizes_new,
char *  str_new 
)

This function is used in O2sclpy in o2graph_plotter::parse_argv() to process aliases in the o2graph executable. It converts the input data to a vector<string> object, applies any aliases stored in the o2scl::cli (or o2scl::cli_readline) object, and then stores the results in sizes_new and str_new (which are allocated beforehand in Python.

◆ o2scl_acol_contours_n()

int o2scl_acol_contours_n ( void *  vp)

This function is used in o2graph_plotter::plot() and o2graph_plotter::plotv().

◆ o2scl_acol_get_column()

int o2scl_acol_get_column ( void *  vp,
char *  col_name,
int &  n,
double *&  ptr 
)

This function is used in o2graph_plotter::plot(), o2graph_plotter::plot1(), o2graph_plotter::rplot(), o2graph_plotter::scatter(), o2graph_plotter::histplot(), o2graph_plotter::hist2dplot(), and o2graph_plotter::errorbar().

◆ o2scl_acol_get_double_arr()

int o2scl_acol_get_double_arr ( void *  vp,
int &  n,
double *&  ptr 
)

This function is used in o2graph_plotter::plot1().

◆ o2scl_acol_get_hist_2d()

int o2scl_acol_get_hist_2d ( void *  vp,
int &  nx,
double *&  xptr,
int &  ny,
double *&  yptr,
double *&  data 
)

This function is used in o2graph_plotter::den_plot().

◆ o2scl_acol_get_hist_reps()

int o2scl_acol_get_hist_reps ( void *  vp,
int &  n,
double *&  ptr 
)

This function is used in o2graph_plotter::plot().

◆ o2scl_acol_get_hist_wgts()

int o2scl_acol_get_hist_wgts ( void *  vp,
int &  n,
double *&  ptr 
)

This function is used in o2graph_plotter::plot().

◆ o2scl_acol_get_row_ser()

int o2scl_acol_get_row_ser ( void *  vp,
char *  parttern,
int  row_index,
int &  n,
double *&  ptr 
)
Note
This function is currently unused. It may have been a precursor for a mult-vector-spec?

◆ o2scl_acol_get_slice()

int o2scl_acol_get_slice ( void *  vp,
char *  slice_name,
int &  nx,
double *&  xptr,
int &  ny,
double *&  yptr,
double *&  data 
)

This function is used in o2graph_plotter::den_plot().

◆ o2scl_acol_get_tensor_grid3()

int o2scl_acol_get_tensor_grid3 ( void *  vp,
int &  nx,
int &  ny,
int &  nz,
const double *&  xg,
const double *&  yg,
const double *&  zg,
const double *&  data 
)

This function is used in o2graph_plotter for yt-add-vol.

◆ o2scl_acol_get_type()

void o2scl_acol_get_type ( void *  vp,
int &  n,
char *&  str 
)

This function is used in o2graph_plotter::get_type(), o2graph_plotter::den_plot(), o2graph_plotter::plot(), o2graph_plotter::rplot(), o2graph_plotter::scatter(), o2graph_plotter::histplot(), o2graph_plotter::hist2dplot(), o2graph_plotter::errorbar(), o2graph_plotter::plot1(), and o2graph_plotter::parse_string_list().

◆ o2scl_acol_mult_vectors_to_conts()

int o2scl_acol_mult_vectors_to_conts ( void *  vp,
char *  str1,
char *  str2 
)

This function is used in o2graph_plotter::plotv().

◆ o2scl_acol_parse()

void o2scl_acol_parse ( void *  vp,
int  n_entries,
int *  sizes,
char *  str 
)

This function uses the executes the commands stored n_entries, sizes, and str using the o2scl::cli object in o2scl_acol::acol_manager as if they were typed on the command line.

This function is used in O2sclpy in o2graph_plotter::set_wrapper(), o2graph_plotter::get_wrapper(), and o2graph_plotter::gen_acol().

◆ o2scl_acol_parse_arrays()

std::vector<std::string> o2scl_acol_parse_arrays ( int  n_entries,
int *  sizes,
char *  str 
)

This function operates on an integer n_entries, an array sizes (which has length n_entries) and an array of characters str which has a length equal to the sum of the entries in the array sizes. The sizes array contains the length of each string, and the str array contains the characters in multiple strings, concatenated together to form a single combined string. This function takes the data in these three objects and creates an object of type vector<string> from it, similar to the way that o2scl_hdf::hdf_file::gets_vec() reads a string array from an HDF5 file.

This function is used in o2scl_acol_parse(), o2scl_acol_alias_counts() and o2scl_acol_apply_aliases() .

◆ o2scl_acol_pdma_get_base()

int o2scl_acol_pdma_get_base ( void *  vp,
int &  ndim,
int &  n,
double *&  low,
double *&  high 
)

This function is used in o2graph_plotter::plot().

◆ o2scl_acol_pdma_get_cube()

int o2scl_acol_pdma_get_cube ( void *  vp,
int  ix,
double *&  low,
double *&  high,
double &  frac_vol,
double &  weight 
)

This function is used in o2graph_plotter::plot().

◆ o2scl_acol_set_names()

void o2scl_acol_set_names ( void *  vp,
int  n1,
char *  cmd_name,
int  n2,
char *  short_desc,
int  n3,
char *  env_var 
)

This function is used in O2sclpy in o2graph_plotter::parse_argv() to communicate three strings which are used in the o2scl_acol::acol_manager class.

◆ o2scl_acol_tensor_to_table3d()

int o2scl_acol_tensor_to_table3d ( void *  vp,
int  i1,
int  i2 
)

There are two sets of values for i1 and i2 which are allowed, either i1=0, i2=1 or i1=1, i2=0, the latter of which corresponds to transposing the two indices.

This function is used in o2graph_plotter::den_plot().

◆ o2scl_create_acol_manager()

void* o2scl_create_acol_manager ( )

This function creates an object of type o2scl_acol::acol_manager with the new operator and then calls the function o2scl_acol::acol_manager::run() .

◆ o2scl_free_acol_manager()

void o2scl_free_acol_manager ( void *  vp)

This function uses delete to free the memory associated with an object of type o2scl_acol::acol_manager .

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).