blahut_cap, which contains all the setting parameters and resulting data.
The following functions are provided to manipulating an object of type blahut_cap.
blahut_cap * blahut_cap_init( const gsl_matrix* Q, const gsl_vector* e );This function takes a forward transition matrix (of type
gsl_matrix) and an expense schedule (of type gsl_vector) as arguments, and returns a pointer to an initialized (dynamically allocated) object of type blahut_cap, which will be used for further specifying channel and algorithm parameters, storing estimated data.
void blahut_cap_free( blahut_cap* cap);Since
blahut_cap is dynamically allocated, never forget to free the memory after using it. blahut_cap_free() takes a pointer to a capacity object and frees the corresponding object and all the relevant memory.
Note: do not free this pointer by using free() from standard C, as some pointers in that object also pointing to dynamically allocated memory blocks.
blahut_cap * blahut_cap_setSRange(blahut_cap * cap, double s_L, double s_U, double step);After an
blahut_cap object has been initialized, this function is used to set the
blahut_cap * blahut_cap_calc( blahut_cap * cap );When given a specific
blahut_ce_curve blahut_cap_iterate_over_s( blahut_cap * cap, const char* filename);After setting the
blahut_cap_calc() function repeatedly.
Kefei Lu 2008-05-15