-
-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Parameter.h
2083 lines (2032 loc) · 70.2 KB
/
Parameter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Written (W) 2010 Soeren Sonnenburg
* Written (W) 2011-2013 Heiko Strathmann
* Copyright (C) 2010 Berlin Institute of Technology
*/
#ifndef __PARAMETER_H__
#define __PARAMETER_H__
#include <shogun/lib/common.h>
#include <shogun/lib/DataType.h>
#include <shogun/base/DynArray.h>
#include <shogun/lib/SGVector.h>
namespace shogun
{
class CSGObject;
class CSerializableFile;
template <class ST> class SGString;
template <class T> class SGMatrix;
template <class T> class SGSparseMatrix;
template <class T> class SGSparseVector;
/** @brief parameter struct */
struct TParameter
{
/** explicit constructor
* @param datatype datatype
* @param parameter pointer to parameter
* @param name name of parameter
* @param description description of parameter
*/
explicit TParameter(const TSGDataType* datatype, void* parameter,
const char* name, const char* description);
/** destructor */
~TParameter();
/** print with prefix
* @param prefix prefix to print
*/
void print(const char* prefix);
/** save to serializable file
* @param file destination file
* @param prefix prefix
*/
bool save(CSerializableFile* file, const char* prefix="");
/** load from serializable file
* @param file source file
* @param prefix prefix
*/
bool load(CSerializableFile* file, const char* prefix="");
/** Allocates data for this instance from scratch. This is one of the core
* methods in parameter migration. It is used if parameters have to be
* loaded from file without having a class instance to put the data into.
* Namely, the data length variables are allocated,
* for numeric scalars, the memory is allocated,
* for SG_OBJECT scalars, a pointer to an CSGObject is allocated,
* for non-scalars, the pointer to the data is allocated
* for non-scalars, the actual data is also allocated via cont_new()
*
* @param dims desired length of the data
* @param new_cont_call whether new_cont should be called, if false, only scalar
* non-sgobject data will be allocated (needed for migration)
* */
void allocate_data_from_scratch(SGVector<index_t> dims, bool new_cont_call=true);
/** Given another TParameter instance (with same type, except for lengths)
* all its data is copied to the current one. This means in case of numeric
* scalars that the value is copied and in SG_OBJECT scalars and any arrays
* that the pointer to the data is copied. The old data is overwritten.
* Old SG_OBJECTS are SG_UNREF'ed and the new ones are SG_REF'ed.
* @param source source TParameter instance to copy from */
void copy_data(const TParameter* source);
/** Numerically this instance with another instance. Compares recursively
* in case of non-numerical parameters
*
* @param other other instance to compare with
* @param accuracy accuracy for numerical comparison
* @param tolerant allows linient check on float equality (within accuracy)
* @return true if given parameter instance is equal, false otherwise
*/
bool equals(TParameter* other, float64_t accuracy=0.0, bool tolerant=false);
/** Given two pointers to a scalar element of a given primitive-type, this
* method compares the values up to a given accuracy.
*
* If the type of the data is SGObject, recursively calls equals on the
* object.
*
* @param ptype primitive type of both data
* @param data1 pointer 1
* @param data2 pointer 2
* @param accuracy accuracy to compare
* @param tolerant allows linient check on float equality (within accuracy)
* @return whether the data was equal
*/
static bool compare_ptype(EPrimitiveType ptype, void* data1, void* data2,
float64_t accuracy=0.0, bool tolerant=false);
/** Given two pointers to a string element of a given primitive-type, this
* method compares the values up to a given accuracy.
*
* If the type of the data is SGObject, recursively calls equals on the
* object.
*
* @param stype string type of both data
* @param ptype primitive type of both data
* @param data1 pointer 1
* @param data2 pointer 2
* @param accuracy accuracy to compare
* @param tolerant allows linient check on float equality (within accuracy)
* @return whether the data was equal
*/
static bool compare_stype(EStructType stype, EPrimitiveType ptype,
void* data1, void* data2, float64_t accuracy=0.0, bool tolerant=false);
/** copy primitive type from source to target
*
* @param ptype the primitive type
* @param source from where to copy
* @param target where to copy to
*/
static bool copy_ptype(EPrimitiveType ptype, void* source, void* target);
/** copy structured type from source to target
*
* @param stype the structured type
* @param ptype the primitive type that the structured objects use
* @param source from where to copy
* @param target where to copy to
*/
static bool copy_stype(EStructType stype, EPrimitiveType ptype,
void* source, void* target);
/** copy this to parameter target
*
* @param target where this should be copied to
*/
bool copy(TParameter* target);
/** operator for comparison, (by string m_name) */
bool operator==(const TParameter& other) const;
/** operator for comparison (by string m_name) */
bool operator<(const TParameter& other) const;
/** operator for comparison (by string m_name) */
bool operator>(const TParameter& other) const;
/** type of parameter */
TSGDataType m_datatype;
/** pointer to parameter */
void* m_parameter;
/** name of parameter */
char* m_name;
/** description of parameter */
char* m_description;
/** if this is set true, the data, m_parameter points to, m_parameter
* itself, and possible lengths of the type will be deleted in destructor.
* This is needed because in data migration, TParameter instances are
* created from scratch without having a class instance and allocated data
* has to ne deleted in this case.
* The only way to set this is via an alternate constructor, false by
* default */
bool m_delete_data;
/** @return true if data was not allocated by a class which registered
* its parameter, but from scratch using allocate_data_from_scratch */
bool m_was_allocated_from_scratch;
/** Incrementally get a hash from parameter value
*
* @param hash current hash value
* @param carry value for incremental murmur hashing
* @param total_length byte length of parameters. Function will
* add byte length to received value
*
*/
void get_incremental_hash(
uint32_t& hash, uint32_t& carry, uint32_t& total_length);
/** test if parameter can be validly accessed, e.g., in case of a
* list/vector/matrix of objects the list/vector/matrix has non-zero length
*/
bool is_valid();
private:
char* new_prefix(const char* s1, const char* s2);
void delete_cont();
void new_cont(SGVector<index_t> dims);
bool new_sgserial(CSGObject** param, EPrimitiveType generic,
const char* sgserializable_name,
const char* prefix);
bool save_ptype(CSerializableFile* file, const void* param,
const char* prefix);
bool load_ptype(CSerializableFile* file, void* param,
const char* prefix);
bool save_stype(CSerializableFile* file, const void* param,
const char* prefix);
bool load_stype(CSerializableFile* file, void* param,
const char* prefix);
};
/** @brief Parameter class
*
* Must not be an CSGObject to prevent a recursive call of
* constructors.
*/
class Parameter
{
public:
/** explicit constructor */
explicit Parameter();
/** destructor */
virtual ~Parameter();
/** print
* @param prefix prefix
*/
virtual void print(const char* prefix="");
/** save to serializable file
* @param file destination file
* @param prefix prefix
*/
virtual bool save(CSerializableFile* file, const char* prefix="");
/* load from serializable file
* @param file source file
* @param prefix prefix
virtual bool load(CSerializableFile* file, const char* prefix="");
*/
/** getter for number of parameters
* @return number of parameters
*/
virtual int32_t get_num_parameters()
{
return m_params.get_num_elements();
}
/** Takes another Parameter instance and sets all parameters of this
* instance (with equal name) to the values of the provided one.
* (Note that if CSGObjects are replaced, the old ones are SG_UNREFed
* and the new ones are SG_REFed)
* Currently only works for any float64_t and CSGObject type.
*
* @param params another Parameter instance
*/
void set_from_parameters(Parameter* params);
/** Adds all parameters from another instance to this one
*
* @param params another Parameter instance
*
*/
void add_parameters(Parameter* params);
/** Checks if a parameter with the spcified name is included
*
* @return true if parameter with name is included
*/
bool contains_parameter(const char* name);
/** Getter for TParameter elements (Does not to bound checking)
*
* @param idx desired index
* @return pointer to the TParameter with the specified index
*/
inline TParameter* get_parameter(int32_t idx)
{
return m_params.get_element(idx);
}
/** Getter for Tparameter elements by name
*
* @param name name of desired parameter
* @return parameter with desired name, NULL if non such found
*/
inline TParameter* get_parameter(const char* name)
{
TParameter* result=NULL;
for (index_t i=0; i<m_params.get_num_elements(); ++i)
{
result=m_params.get_element(i);
if (!strcmp(name, result->m_name))
break;
else
result=NULL;
}
return result;
}
/* ************************************************************ */
/* Scalar wrappers */
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(bool* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(char* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(int8_t* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(uint8_t* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(int16_t* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(uint16_t* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(int32_t* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(uint32_t* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(int64_t* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(uint64_t* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(float32_t* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(float64_t* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(floatmax_t* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(complex128_t* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(CSGObject** param,
const char* name, const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGString<bool>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGString<char>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGString<int8_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGString<uint8_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGString<int16_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGString<uint16_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGString<int32_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGString<uint32_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGString<int64_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGString<uint64_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGString<float32_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGString<float64_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGString<floatmax_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGSparseVector<bool>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGSparseVector<char>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGSparseVector<int8_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGSparseVector<uint8_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGSparseVector<int16_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGSparseVector<uint16_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGSparseVector<int32_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGSparseVector<uint32_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGSparseVector<int64_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGSparseVector<uint64_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGSparseVector<float32_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGSparseVector<float64_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGSparseVector<floatmax_t>* param, const char* name,
const char* description="");
/** add param
* @param param parameter itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGSparseVector<complex128_t>* param, const char* name,
const char* description="");
/* ************************************************************ */
/* Vector wrappers */
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(bool** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(char** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(int8_t** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(uint8_t** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(int16_t** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(uint16_t** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(int32_t** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(uint32_t** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(int64_t** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(uint64_t** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(float32_t** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(float64_t** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(floatmax_t** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(complex128_t** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(CSGObject*** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGString<bool>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGString<char>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGString<int8_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGString<uint8_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGString<int16_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGString<uint16_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGString<int32_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGString<uint32_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGString<int64_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGString<uint64_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGString<float32_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGString<float64_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGString<floatmax_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGSparseVector<bool>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGSparseVector<char>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGSparseVector<int8_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGSparseVector<uint8_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGSparseVector<int16_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGSparseVector<uint16_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGSparseVector<int32_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGSparseVector<uint32_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGSparseVector<int64_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGSparseVector<uint64_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGSparseVector<float32_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGSparseVector<float64_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGSparseVector<floatmax_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param length length of vector
* @param name name of parameter
* @param description description of parameter
*/
void add_vector(SGSparseVector<complex128_t>** param, index_t* length,
const char* name, const char* description="");
/** add vector param
* @param param parameter vector itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGVector<bool>* param, const char* name,
const char* description="");
/** add vector param
* @param param parameter vector itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGVector<char>* param, const char* name,
const char* description="");
/** add vector param
* @param param parameter vector itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGVector<int8_t>* param, const char* name,
const char* description="");
/** add vector param
* @param param parameter vector itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGVector<uint8_t>* param, const char* name,
const char* description="");
/** add vector param
* @param param parameter vector itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGVector<int16_t>* param, const char* name,
const char* description="");
/** add vector param
* @param param parameter vector itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGVector<uint16_t>* param, const char* name,
const char* description="");
/** add vector param
* @param param parameter vector itself
* @param name name of parameter
* @param description description of parameter
*/
void add(SGVector<int32_t>* param, const char* name,
const char* description="");
/** add vector param
* @param param parameter vector itself
* @param name name of parameter