19 #define ap_assert(cond) arb_assert(cond)
26 for (
long i=0; i<si; i++) {
33 for (
long i=0; i<size; i++) {
42 void AP_userdef_matrix::set_desc(
char**& which_desc,
int idx,
const char *desc) {
44 which_desc[idx] = strdup(desc);
51 if (x_description[x]) {
53 if (y_description[y]) {
54 sprintf(buffer,
"%s/B%s/B%s", awar_prefix, x_description[x], y_description[y]);
71 if (x_description[x]) {
73 if (y_description[y]) {
74 sprintf(buffer,
"%s/B%s/B%s", awar_prefix, x_description[x], y_description[y]);
87 if (x_description[x]) {
93 if (x_description[x]) {
96 if (y_description[y]) {
97 sprintf(buffer,
"%s/B%s/B%s", awar_prefix, x_description[x], y_description[y]);
111 if (x_description[x]) {
113 if (y!=x && y_description[y]) {
114 sum += this->
get(x,
y);
120 if (sum == 0.0)
return;
124 this->
set(x, y,
get(x, y)/sum);
131 if (x_description) free(x_description[i]);
132 if (y_description) free(y_description[i]);
146 void TEST_AP_smatrix() {
155 for (
int i = 0; i<
SIZE; ++i) {
156 for (
int j = 0; j<=i; ++j) {
157 m.set(i, j, j>0 ?
AP_FLOAT(i)/j : i);
AW_awar * set_minmax(float min, float max)
void set(int i, int j, AP_FLOAT val)
void create_input_fields(AW_window *aww)
char buffer[MESSAGE_BUFFERSIZE]
AW_awar * awar_float(const char *var_name, float default_value=0.0, AW_default default_file=AW_ROOT_DEFAULT)
AW_awar * awar(const char *awar)
void create_input_field(const char *awar_name, int columns=0)
TYPE * ARB_calloc(size_t nelem)
void update_from_awars(AW_root *awr)
void create_awars(AW_root *awr)
#define TEST_EXPECT_EQUAL(expr, want)
void create_button(const char *macro_name, AW_label label, const char *mnemonic=NULp, const char *color=NULp)