Graphviz  2.41.20171026.1811
Functions
general.c File Reference
#include "general.h"
#include <errno.h>
Include dependency graph for general.c:

Go to the source code of this file.

Functions

real vector_median (int n, real *x)
 
real vector_percentile (int n, real *x, real y)
 
real drand ()
 
int irand (int n)
 
intrandom_permutation (int n)
 
realvector_subtract_from (int n, real *x, real *y)
 
realvector_subtract_to (int n, real *x, real *y)
 
realvector_add_to (int n, real *x, real *y)
 
real vector_product (int n, real *x, real *y)
 
realvector_saxpy (int n, real *x, real *y, real beta)
 
realvector_saxpy2 (int n, real *x, real *y, real beta)
 
void vector_print (char *s, int n, real *x)
 
void vector_take (int n, real *v, int m, int *p, real **u)
 
void vector_float_take (int n, float *v, int m, int *p, float **u)
 
int comp_ascend (const void *s1, const void *s2)
 
int comp_descend (const void *s1, const void *s2)
 
int comp_descend_int (const void *s1, const void *s2)
 
int comp_ascend_int (const void *s1, const void *s2)
 
void vector_ordering (int n, real *v, int **p, int ascending)
 
void vector_sort_real (int n, real *v, int ascending)
 
void vector_sort_int (int n, int *v, int ascending)
 
int excute_system_command3 (char *s1, char *s2, char *s3)
 
int excute_system_command (char *s1, char *s2)
 
real distance_cropped (real *x, int dim, int i, int j)
 
real distance (real *x, int dim, int i, int j)
 
real point_distance (real *p1, real *p2, int dim)
 
char * strip_dir (char *s)
 
void scale_to_box (real xmin, real ymin, real xmax, real ymax, int n, int dim, real *x)
 
int digitsQ (char *s)
 
int validQ_int_string (char *to_convert, int *v)
 

Function Documentation

int comp_ascend ( const void *  s1,
const void *  s2 
)

Definition at line 158 of file general.c.

References real.

Referenced by vector_ordering(), and vector_sort_real().

int comp_ascend_int ( const void *  s1,
const void *  s2 
)

Definition at line 196 of file general.c.

Referenced by vector_sort_int().

int comp_descend ( const void *  s1,
const void *  s2 
)

Definition at line 171 of file general.c.

References real.

Referenced by vector_ordering(), and vector_sort_real().

int comp_descend_int ( const void *  s1,
const void *  s2 
)

Definition at line 183 of file general.c.

Referenced by vector_sort_int().

int digitsQ ( char *  s)

Definition at line 347 of file general.c.

real distance ( real x,
int  dim,
int  i,
int  j 
)

Definition at line 283 of file general.c.

References dist(), and real.

real distance_cropped ( real x,
int  dim,
int  i,
int  j 
)

Definition at line 275 of file general.c.

References dist(), MAX, MINDIST, and real.

real drand ( void  )
int excute_system_command ( char *  s1,
char *  s2 
)

Definition at line 267 of file general.c.

int excute_system_command3 ( char *  s1,
char *  s2,
char *  s3 
)

Definition at line 258 of file general.c.

int irand ( int  n)

Definition at line 56 of file general.c.

References assert.

Referenced by random_permutation().

real point_distance ( real p1,
real p2,
int  dim 
)

Definition at line 291 of file general.c.

References dist(), and real.

Referenced by QuadTree_get_supernodes_internal().

int* random_permutation ( int  n)

Definition at line 63 of file general.c.

References irand(), MALLOC, and NULL.

void scale_to_box ( real  xmin,
real  ymin,
real  xmax,
real  ymax,
int  n,
int  dim,
real x 
)

Definition at line 312 of file general.c.

References MAX, max, MIN, real, xmin, and ymin.

Referenced by uniform_stress().

char* strip_dir ( char *  s)

Definition at line 299 of file general.c.

References FALSE, and TRUE.

Referenced by dump_coordinates(), and makeDotGraph().

int validQ_int_string ( char *  to_convert,
int v 
)

Definition at line 354 of file general.c.

References int, INT_MAX, and INT_MIN.

real* vector_add_to ( int  n,
real x,
real y 
)

Definition at line 94 of file general.c.

void vector_float_take ( int  n,
float *  v,
int  m,
int p,
float **  u 
)

Definition at line 145 of file general.c.

References assert, and MALLOC.

real vector_median ( int  n,
real x 
)

Definition at line 21 of file general.c.

References FREE, NULL, real, TRUE, and vector_ordering().

void vector_ordering ( int  n,
real v,
int **  p,
int  ascending 
)

Definition at line 210 of file general.c.

References comp_ascend(), comp_descend(), FREE, int, MALLOC, and real.

Referenced by vector_median(), and vector_percentile().

real vector_percentile ( int  n,
real x,
real  y 
)

Definition at line 35 of file general.c.

References FREE, MAX, MIN, NULL, real, TRUE, and vector_ordering().

void vector_print ( char *  s,
int  n,
real x 
)

Definition at line 122 of file general.c.

real vector_product ( int  n,
real x,
real y 
)

Definition at line 101 of file general.c.

References real.

Referenced by StressMajorizationSmoother_smooth().

real* vector_saxpy ( int  n,
real x,
real y,
real  beta 
)

Definition at line 108 of file general.c.

real* vector_saxpy2 ( int  n,
real x,
real y,
real  beta 
)

Definition at line 115 of file general.c.

void vector_sort_int ( int  n,
int v,
int  ascending 
)

Definition at line 250 of file general.c.

References comp_ascend_int(), and comp_descend_int().

void vector_sort_real ( int  n,
real v,
int  ascending 
)

Definition at line 243 of file general.c.

References comp_ascend(), comp_descend(), and real.

real* vector_subtract_from ( int  n,
real x,
real y 
)

Definition at line 82 of file general.c.

real* vector_subtract_to ( int  n,
real x,
real y 
)

Definition at line 88 of file general.c.

void vector_take ( int  n,
real v,
int  m,
int p,
real **  u 
)

Definition at line 132 of file general.c.

References assert, MALLOC, and real.