Angka  0.0.1
A C library focusing on data manipulation and visualization
init.h File Reference

the standard library for manipulating C data types. More...

Go to the source code of this file.

Data Structures

struct  s_slice
 a struct for slicing AgxMatrix and AgxVector data More...
 

Typedefs

typedef struct s_slice AgxSlice
 a struct for slicing AgxMatrix and AgxVector data More...
 

Enumerations

enum  e_bool { FALSE, TRUE }
 boolean More...
 

Functions

void agx_print_integer (int val)
 print an integer value More...
 
void agx_print_double (double val)
 print a double value More...
 
void agx_print_string (char *val)
 print a string (an array of character) More...
 
int agx_string_length_integer (int val)
 count the string length of an integer value More...
 
int agx_string_length_string (char *str)
 count the string length of a string More...
 
int agx_string_length_double (double val)
 count the string length of a double value More...
 
char * agx_string_from_double_set (char *fmt, double val)
 create a string from double using special format More...
 
char * agx_string_from_integer (int val)
 create a string from integer More...
 
int agx_string_append_integer (char *target, int val, int isInitial)
 appending the existing string with an integer value More...
 
char * agx_string_from_double (double val)
 create a string from double More...
 
int agx_string_append_double (char *target, double val, int isInitial)
 appending the existing string with an double value More...
 
int agx_print_values (char *inbetween, char *end, char *fmt,...)
 print some values in variant formats More...
 
int agx_print_values_space (char *fmt,...)
 the quick function of agx_print_values using inbetween = " ", and end = "\n" More...
 
int agx_print_values_new_line (char *fmt,...)
 the quick function of agx_print_values using inbetween = "\n", and end = " " More...
 

Detailed Description

the standard library for manipulating C data types.

Typedef Documentation

◆ AgxSlice

typedef struct s_slice AgxSlice

a struct for slicing AgxMatrix and AgxVector data

it is used as a typedef for AgxSlice

Warning
it is still not implementing yet.

Enumeration Type Documentation

◆ e_bool

enum e_bool

boolean

Enumerator
FALSE 
TRUE 

Function Documentation

◆ agx_print_values()

int agx_print_values ( char *  inbetween,
char *  end,
char *  fmt,
  ... 
)

print some values in variant formats

Parameters
inbetweendefine string between values, such as newline "\n" or space " "
enddefine string after the end value, such as newline "\n"
fmtformat style for all, for the example "fddcss" -> double "f", string "s", char "c", and integer "d"
args(...)all values as order, such as: 5, "hello", 2.7
Returns
0 if success.

◆ agx_print_values_new_line()

int agx_print_values_new_line ( char *  fmt,
  ... 
)

the quick function of agx_print_values using inbetween = "\n", and end = " "

Returns
0 if success.

◆ agx_print_values_space()

int agx_print_values_space ( char *  fmt,
  ... 
)

the quick function of agx_print_values using inbetween = " ", and end = "\n"

Returns
0 if success.

◆ agx_string_append_double()

int agx_string_append_double ( char *  target,
double  val,
int  isInitial 
)

appending the existing string with an double value

Parameters
[out]targetthe string target
[in]valthe input value
[in]isInitialboolean value, TRUE if using copy, not concatenate
Returns
0 if success, negative value if error

◆ agx_string_append_integer()

int agx_string_append_integer ( char *  target,
int  val,
int  isInitial 
)

appending the existing string with an integer value

Parameters
[out]targetthe string target
[in]valthe input value
[in]isInitialboolean value, TRUE if using copy, not concatenate
Returns
negative value if error, 0 if success.

◆ agx_string_from_double()

char* agx_string_from_double ( double  val)

create a string from double

Parameters
valdouble value

usage:

char *str;
Note
return NULL if error.

◆ agx_string_from_double_set()

char* agx_string_from_double_set ( char *  fmt,
double  val 
)

create a string from double using special format

Parameters
fmtformat style of double
valdouble value

usage:

char *str;
str = agx_string_from_double_set("%.2f",7.897);
Note
return NULL if error

◆ agx_string_from_integer()

char* agx_string_from_integer ( int  val)

create a string from integer

Parameters
val

usage:

char *str;
Note
return NULL if error.