3 * sushivision copyright (C) 2006-2007 Monty <monty@xiph.org>
5 * sushivision is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * sushivision is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with sushivision; see the file COPYING. If not, write to the
17 * Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
25 #include "sushimacro.h"
27 static void discrete_objective(double *d
, double *ret
){
32 if(!(X
%100) && !(Y
%100))
38 int sv_submain(int argc
, char *argv
[]){
40 svm_new("alignment test");
42 svm_scale_vals(-500,-10,0,10,500);
44 svm_dim_discrete(1,1);
45 svm_dim_value(-2,NAN
,2);
47 svm_scale_vals(-500,-10,0,10,500);
49 svm_dim_discrete(1,1);
50 svm_dim_value(-2,NAN
,2);
52 //sv_func_t *f = sv_func_new(s, 0, 1, discrete_objective, 0);
54 //sv_obj_t *o0 = sv_obj_new(s,0,"test pattern",
55 // (sv_func_t *[]){f},
58 //sv_obj_make_scale(o0, 2, (double []){0, 1.0}, NULL, 0);
61 svm_obj_simple(0,"test pattern",f
,"Y");
63 //sv_panel_t *p2 = sv_panel_new_2d(s,0,"Discrete data example",
64 // (sv_obj_t *[]){o0,NULL},
65 // (sv_dim_t *[]){d0,d1,NULL},
68 svm_panel_2d(0,"Discrete data example");
70 //sv_panel_t *px = sv_panel_new_1d(s,1,"X Slice", s->objective_list[0]->scale,
71 // (sv_obj_t *[]){o0,NULL},
73 //sv_panel_link_1d(px, p2, SV_PANEL_LINK_X);
77 svm_panel_1d(1,"X Slice");
80 //sv_panel_t *py = sv_panel_new_1d(s,2,"Y Slice", s->objective_list[0]->scale,
81 // (sv_obj_t *[]){o0,NULL},
82 // NULL,SV_PANEL_FLIP);
83 //sv_panel_link_1d(py, p2, SV_PANEL_LINK_Y);
87 svm_panel_1d(2,"Y Slice");