SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
base
Parameter.h
浏览该文件的文档.
1
/*
2
* This program is free software; you can redistribute it and/or modify
3
* it under the terms of the GNU General Public License as published by
4
* the Free Software Foundation; either version 3 of the License, or
5
* (at your option) any later version.
6
*
7
* Written (W) 2010 Soeren Sonnenburg
8
* Written (W) 2011-2013 Heiko Strathmann
9
* Copyright (C) 2010 Berlin Institute of Technology
10
*/
11
#ifndef __PARAMETER_H__
12
#define __PARAMETER_H__
13
14
#include <
shogun/lib/common.h
>
15
#include <
shogun/io/SGIO.h
>
16
#include <
shogun/lib/DataType.h
>
17
#include <
shogun/lib/SGVector.h
>
18
#include <
shogun/lib/SGMatrix.h
>
19
#include <
shogun/lib/SGSparseMatrix.h
>
20
#include <
shogun/io/SerializableFile.h
>
21
#include <
shogun/base/DynArray.h
>
22
23
namespace
shogun
24
{
26
struct
TParameter
27
{
34
explicit
TParameter
(
const
TSGDataType
* datatype,
void
* parameter,
35
const
char
* name,
const
char
* description);
36
38
~TParameter
();
39
43
void
print
(
const
char
* prefix);
44
49
bool
save
(
CSerializableFile
* file,
const
char
* prefix=
""
);
50
55
bool
load
(
CSerializableFile
* file,
const
char
* prefix=
""
);
56
70
void
allocate_data_from_scratch
(
SGVector<index_t>
dims,
bool
new_cont_call=
true
);
71
78
void
copy_data
(
const
TParameter
* source);
79
88
bool
equals
(
TParameter
* other,
float64_t
accuracy=0.0,
bool
tolerant=
false
);
89
103
static
bool
compare_ptype
(EPrimitiveType ptype,
void
* data1,
void
* data2,
104
float64_t
accuracy=0.0,
bool
tolerant=
false
);
105
120
static
bool
compare_stype
(EStructType stype, EPrimitiveType ptype,
121
void
* data1,
void
* data2,
float64_t
accuracy=0.0,
bool
tolerant=
false
);
122
129
static
bool
copy_ptype
(EPrimitiveType ptype,
void
* source,
void
* target);
130
138
static
bool
copy_stype
(EStructType stype, EPrimitiveType ptype,
139
void
* source,
void
* target);
140
145
bool
copy
(
TParameter
* target);
146
147
148
150
bool
operator==
(
const
TParameter
& other)
const
;
151
153
bool
operator<
(
const
TParameter
& other)
const
;
154
156
bool
operator>
(
const
TParameter
& other)
const
;
157
159
TSGDataType
m_datatype
;
161
void
*
m_parameter
;
163
char
*
m_name
;
165
char
*
m_description
;
166
174
bool
m_delete_data
;
175
178
bool
m_was_allocated_from_scratch
;
179
188
void
get_incremental_hash
(
189
uint32_t& hash, uint32_t& carry, uint32_t& total_length);
190
194
bool
is_valid
();
195
196
private
:
197
char
* new_prefix(
const
char
* s1,
const
char
* s2);
198
void
delete_cont();
199
void
new_cont(
SGVector<index_t>
dims);
200
bool
new_sgserial(
CSGObject
** param, EPrimitiveType
generic
,
201
const
char
* sgserializable_name,
202
const
char
* prefix);
203
bool
save_ptype(
CSerializableFile
* file,
const
void
* param,
204
const
char
* prefix);
205
bool
load_ptype(
CSerializableFile
* file,
void
* param,
206
const
char
* prefix);
207
bool
save_stype(
CSerializableFile
* file,
const
void
* param,
208
const
char
* prefix);
209
bool
load_stype(
CSerializableFile
* file,
void
* param,
210
const
char
* prefix);
211
212
};
213
219
class
Parameter
220
{
221
public
:
223
explicit
Parameter
();
225
virtual
~Parameter
();
226
230
virtual
void
print
(
const
char
* prefix=
""
);
231
236
virtual
bool
save
(
CSerializableFile
* file,
const
char
* prefix=
""
);
237
238
/* load from serializable file
239
* @param file source file
240
* @param prefix prefix
241
virtual bool load(CSerializableFile* file, const char* prefix="");
242
*/
243
247
virtual
int32_t
get_num_parameters
()
248
{
249
return
m_params
.get_num_elements();
250
}
251
260
void
set_from_parameters
(
Parameter
* params);
261
267
void
add_parameters
(
Parameter
* params);
268
273
bool
contains_parameter
(
const
char
* name);
274
280
inline
TParameter
*
get_parameter
(int32_t idx)
281
{
282
return
m_params
.get_element(idx);
283
}
284
290
inline
TParameter
*
get_parameter
(
const
char
* name)
291
{
292
TParameter
* result=NULL;
293
294
for
(
index_t
i=0; i<
m_params
.get_num_elements(); ++i)
295
{
296
result=
m_params
.get_element(i);
297
if
(!strcmp(name, result->
m_name
))
298
break
;
299
else
300
result=NULL;
301
}
302
303
return
result;
304
}
305
306
/* ************************************************************ */
307
/* Scalar wrappers */
308
314
void
add
(
bool
* param,
const
char
* name,
315
const
char
* description=
""
);
321
void
add
(
char
* param,
const
char
* name,
322
const
char
* description=
""
);
328
void
add
(int8_t* param,
const
char
* name,
329
const
char
* description=
""
);
335
void
add
(uint8_t* param,
const
char
* name,
336
const
char
* description=
""
);
342
void
add
(int16_t* param,
const
char
* name,
343
const
char
* description=
""
);
349
void
add
(uint16_t* param,
const
char
* name,
350
const
char
* description=
""
);
356
void
add
(int32_t* param,
const
char
* name,
357
const
char
* description=
""
);
363
void
add
(uint32_t* param,
const
char
* name,
364
const
char
* description=
""
);
370
void
add
(int64_t* param,
const
char
* name,
371
const
char
* description=
""
);
377
void
add
(uint64_t* param,
const
char
* name,
378
const
char
* description=
""
);
384
void
add
(
float32_t
* param,
const
char
* name,
385
const
char
* description=
""
);
391
void
add
(
float64_t
* param,
const
char
* name,
392
const
char
* description=
""
);
398
void
add
(
floatmax_t
* param,
const
char
* name,
399
const
char
* description=
""
);
405
void
add
(
complex128_t
* param,
const
char
* name,
406
const
char
* description=
""
);
412
void
add
(
CSGObject
** param,
413
const
char
* name,
const
char
* description=
""
);
419
void
add
(
SGString<bool>
* param,
const
char
* name,
420
const
char
* description=
""
);
426
void
add
(
SGString<char>
* param,
const
char
* name,
427
const
char
* description=
""
);
433
void
add
(
SGString<int8_t>
* param,
const
char
* name,
434
const
char
* description=
""
);
440
void
add
(
SGString<uint8_t>
* param,
const
char
* name,
441
const
char
* description=
""
);
447
void
add
(
SGString<int16_t>
* param,
const
char
* name,
448
const
char
* description=
""
);
454
void
add
(
SGString<uint16_t>
* param,
const
char
* name,
455
const
char
* description=
""
);
461
void
add
(
SGString<int32_t>
* param,
const
char
* name,
462
const
char
* description=
""
);
468
void
add
(
SGString<uint32_t>
* param,
const
char
* name,
469
const
char
* description=
""
);
475
void
add
(
SGString<int64_t>
* param,
const
char
* name,
476
const
char
* description=
""
);
482
void
add
(
SGString<uint64_t>
* param,
const
char
* name,
483
const
char
* description=
""
);
489
void
add
(
SGString<float32_t>
* param,
const
char
* name,
490
const
char
* description=
""
);
496
void
add
(
SGString<float64_t>
* param,
const
char
* name,
497
const
char
* description=
""
);
503
void
add
(
SGString<floatmax_t>
* param,
const
char
* name,
504
const
char
* description=
""
);
510
void
add
(
SGSparseVector<bool>
* param,
const
char
* name,
511
const
char
* description=
""
);
517
void
add
(
SGSparseVector<char>
* param,
const
char
* name,
518
const
char
* description=
""
);
524
void
add
(
SGSparseVector<int8_t>
* param,
const
char
* name,
525
const
char
* description=
""
);
531
void
add
(
SGSparseVector<uint8_t>
* param,
const
char
* name,
532
const
char
* description=
""
);
538
void
add
(
SGSparseVector<int16_t>
* param,
const
char
* name,
539
const
char
* description=
""
);
545
void
add
(
SGSparseVector<uint16_t>
* param,
const
char
* name,
546
const
char
* description=
""
);
552
void
add
(
SGSparseVector<int32_t>
* param,
const
char
* name,
553
const
char
* description=
""
);
559
void
add
(
SGSparseVector<uint32_t>
* param,
const
char
* name,
560
const
char
* description=
""
);
566
void
add
(
SGSparseVector<int64_t>
* param,
const
char
* name,
567
const
char
* description=
""
);
573
void
add
(
SGSparseVector<uint64_t>
* param,
const
char
* name,
574
const
char
* description=
""
);
580
void
add
(
SGSparseVector<float32_t>
* param,
const
char
* name,
581
const
char
* description=
""
);
587
void
add
(
SGSparseVector<float64_t>
* param,
const
char
* name,
588
const
char
* description=
""
);
594
void
add
(
SGSparseVector<floatmax_t>
* param,
const
char
* name,
595
const
char
* description=
""
);
601
void
add
(
SGSparseVector<complex128_t>
* param,
const
char
* name,
602
const
char
* description=
""
);
603
604
/* ************************************************************ */
605
/* Vector wrappers */
606
613
void
add_vector
(
bool
** param,
index_t
* length,
614
const
char
* name,
const
char
* description=
""
);
621
void
add_vector
(
char
** param,
index_t
* length,
622
const
char
* name,
const
char
* description=
""
);
629
void
add_vector
(int8_t** param,
index_t
* length,
630
const
char
* name,
const
char
* description=
""
);
637
void
add_vector
(uint8_t** param,
index_t
* length,
638
const
char
* name,
const
char
* description=
""
);
645
void
add_vector
(int16_t** param,
index_t
* length,
646
const
char
* name,
const
char
* description=
""
);
653
void
add_vector
(uint16_t** param,
index_t
* length,
654
const
char
* name,
const
char
* description=
""
);
661
void
add_vector
(int32_t** param,
index_t
* length,
662
const
char
* name,
const
char
* description=
""
);
669
void
add_vector
(uint32_t** param,
index_t
* length,
670
const
char
* name,
const
char
* description=
""
);
677
void
add_vector
(int64_t** param,
index_t
* length,
678
const
char
* name,
const
char
* description=
""
);
685
void
add_vector
(uint64_t** param,
index_t
* length,
686
const
char
* name,
const
char
* description=
""
);
693
void
add_vector
(
float32_t
** param,
index_t
* length,
694
const
char
* name,
const
char
* description=
""
);
701
void
add_vector
(
float64_t
** param,
index_t
* length,
702
const
char
* name,
const
char
* description=
""
);
709
void
add_vector
(
floatmax_t
** param,
index_t
* length,
710
const
char
* name,
const
char
* description=
""
);
717
void
add_vector
(
complex128_t
** param,
index_t
* length,
718
const
char
* name,
const
char
* description=
""
);
725
void
add_vector
(
CSGObject
*** param,
index_t
* length,
726
const
char
* name,
const
char
* description=
""
);
733
void
add_vector
(
SGString<bool>
** param,
index_t
* length,
734
const
char
* name,
const
char
* description=
""
);
741
void
add_vector
(
SGString<char>
** param,
index_t
* length,
742
const
char
* name,
const
char
* description=
""
);
749
void
add_vector
(
SGString<int8_t>
** param,
index_t
* length,
750
const
char
* name,
const
char
* description=
""
);
757
void
add_vector
(
SGString<uint8_t>
** param,
index_t
* length,
758
const
char
* name,
const
char
* description=
""
);
765
void
add_vector
(
SGString<int16_t>
** param,
index_t
* length,
766
const
char
* name,
const
char
* description=
""
);
773
void
add_vector
(
SGString<uint16_t>
** param,
index_t
* length,
774
const
char
* name,
const
char
* description=
""
);
781
void
add_vector
(
SGString<int32_t>
** param,
index_t
* length,
782
const
char
* name,
const
char
* description=
""
);
789
void
add_vector
(
SGString<uint32_t>
** param,
index_t
* length,
790
const
char
* name,
const
char
* description=
""
);
797
void
add_vector
(
SGString<int64_t>
** param,
index_t
* length,
798
const
char
* name,
const
char
* description=
""
);
805
void
add_vector
(
SGString<uint64_t>
** param,
index_t
* length,
806
const
char
* name,
const
char
* description=
""
);
813
void
add_vector
(
SGString<float32_t>
** param,
index_t
* length,
814
const
char
* name,
const
char
* description=
""
);
821
void
add_vector
(
SGString<float64_t>
** param,
index_t
* length,
822
const
char
* name,
const
char
* description=
""
);
829
void
add_vector
(
SGString<floatmax_t>
** param,
index_t
* length,
830
const
char
* name,
const
char
* description=
""
);
837
void
add_vector
(
SGSparseVector<bool>
** param,
index_t
* length,
838
const
char
* name,
const
char
* description=
""
);
845
void
add_vector
(
SGSparseVector<char>
** param,
index_t
* length,
846
const
char
* name,
const
char
* description=
""
);
853
void
add_vector
(
SGSparseVector<int8_t>
** param,
index_t
* length,
854
const
char
* name,
const
char
* description=
""
);
861
void
add_vector
(
SGSparseVector<uint8_t>
** param,
index_t
* length,
862
const
char
* name,
const
char
* description=
""
);
869
void
add_vector
(
SGSparseVector<int16_t>
** param,
index_t
* length,
870
const
char
* name,
const
char
* description=
""
);
877
void
add_vector
(
SGSparseVector<uint16_t>
** param,
index_t
* length,
878
const
char
* name,
const
char
* description=
""
);
885
void
add_vector
(
SGSparseVector<int32_t>
** param,
index_t
* length,
886
const
char
* name,
const
char
* description=
""
);
893
void
add_vector
(
SGSparseVector<uint32_t>
** param,
index_t
* length,
894
const
char
* name,
const
char
* description=
""
);
901
void
add_vector
(
SGSparseVector<int64_t>
** param,
index_t
* length,
902
const
char
* name,
const
char
* description=
""
);
909
void
add_vector
(
SGSparseVector<uint64_t>
** param,
index_t
* length,
910
const
char
* name,
const
char
* description=
""
);
917
void
add_vector
(
SGSparseVector<float32_t>
** param,
index_t
* length,
918
const
char
* name,
const
char
* description=
""
);
925
void
add_vector
(
SGSparseVector<float64_t>
** param,
index_t
* length,
926
const
char
* name,
const
char
* description=
""
);
933
void
add_vector
(
SGSparseVector<floatmax_t>
** param,
index_t
* length,
934
const
char
* name,
const
char
* description=
""
);
941
void
add_vector
(
SGSparseVector<complex128_t>
** param,
index_t
* length,
942
const
char
* name,
const
char
* description=
""
);
943
944
950
void
add
(
SGVector<bool>
* param,
const
char
* name,
951
const
char
* description=
""
);
957
void
add
(
SGVector<char>
* param,
const
char
* name,
958
const
char
* description=
""
);
964
void
add
(
SGVector<int8_t>
* param,
const
char
* name,
965
const
char
* description=
""
);
971
void
add
(
SGVector<uint8_t>
* param,
const
char
* name,
972
const
char
* description=
""
);
978
void
add
(
SGVector<int16_t>
* param,
const
char
* name,
979
const
char
* description=
""
);
985
void
add
(
SGVector<uint16_t>
* param,
const
char
* name,
986
const
char
* description=
""
);
992
void
add
(
SGVector<int32_t>
* param,
const
char
* name,
993
const
char
* description=
""
);
999
void
add
(
SGVector<uint32_t>
* param,
const
char
* name,
1000
const
char
* description=
""
);
1006
void
add
(
SGVector<int64_t>
* param,
const
char
* name,
1007
const
char
* description=
""
);
1013
void
add
(
SGVector<uint64_t>
* param,
const
char
* name,
1014
const
char
* description=
""
);
1020
void
add
(
SGVector<float32_t>
* param,
const
char
* name,
1021
const
char
* description=
""
);
1027
void
add
(
SGVector<float64_t>
* param,
const
char
* name,
1028
const
char
* description=
""
);
1034
void
add
(
SGVector<floatmax_t>
* param,
const
char
* name,
1035
const
char
* description=
""
);
1041
void
add
(
SGVector<complex128_t>
* param,
const
char
* name,
1042
const
char
* description=
""
);
1048
void
add
(
SGVector<CSGObject*>
* param,
const
char
* name,
1049
const
char
* description=
""
);
1055
void
add
(
SGVector
<
SGString<bool>
>* param,
const
char
* name,
1056
const
char
* description=
""
);
1062
void
add
(
SGVector
<
SGString<char>
>* param,
const
char
* name,
1063
const
char
* description=
""
);
1069
void
add
(
SGVector
<
SGString<int8_t>
>* param,
const
char
* name,
1070
const
char
* description=
""
);
1076
void
add
(
SGVector
<
SGString<uint8_t>
>* param,
const
char
* name,
1077
const
char
* description=
""
);
1083
void
add
(
SGVector
<
SGString<int16_t>
>* param,
const
char
* name,
1084
const
char
* description=
""
);
1090
void
add
(
SGVector
<
SGString<uint16_t>
>* param,
const
char
* name,
1091
const
char
* description=
""
);
1097
void
add
(
SGVector
<
SGString<int32_t>
>* param,
const
char
* name,
1098
const
char
* description=
""
);
1104
void
add
(
SGVector
<
SGString<uint32_t>
>* param,
const
char
* name,
1105
const
char
* description=
""
);
1111
void
add
(
SGVector
<
SGString<int64_t>
>* param,
const
char
* name,
1112
const
char
* description=
""
);
1118
void
add
(
SGVector
<
SGString<uint64_t>
>* param,
const
char
* name,
1119
const
char
* description=
""
);
1125
void
add
(
SGVector
<
SGString<float32_t>
>* param,
const
char
* name,
1126
const
char
* description=
""
);
1132
void
add
(
SGVector
<
SGString<float64_t>
>* param,
const
char
* name,
1133
const
char
* description=
""
);
1139
void
add
(
SGVector
<
SGString<floatmax_t>
>* param,
const
char
* name,
1140
const
char
* description=
""
);
1146
void
add
(
SGVector
<
SGSparseVector<bool>
>* param,
const
char
* name,
1147
const
char
* description=
""
);
1153
void
add
(
SGVector
<
SGSparseVector<char>
>* param,
const
char
* name,
1154
const
char
* description=
""
);
1160
void
add
(
SGVector
<
SGSparseVector<int8_t>
>* param,
const
char
* name,
1161
const
char
* description=
""
);
1167
void
add
(
SGVector
<
SGSparseVector<uint8_t>
>* param,
const
char
* name,
1168
const
char
* description=
""
);
1174
void
add
(
SGVector
<
SGSparseVector<int16_t>
>* param,
const
char
* name,
1175
const
char
* description=
""
);
1181
void
add
(
SGVector
<
SGSparseVector<uint16_t>
>* param,
1182
const
char
* name,
const
char
* description=
""
);
1188
void
add
(
SGVector
<
SGSparseVector<int32_t>
>* param,
const
char
* name,
1189
const
char
* description=
""
);
1195
void
add
(
SGVector
<
SGSparseVector<uint32_t>
>* param,
const
char
* name,
1196
const
char
* description=
""
);
1202
void
add
(
SGVector
<
SGSparseVector<int64_t>
>* param,
const
char
* name,
1203
const
char
* description=
""
);
1209
void
add
(
SGVector
<
SGSparseVector<uint64_t>
>* param,
1210
const
char
* name,
const
char
* description=
""
);
1216
void
add
(
SGVector
<
SGSparseVector<float32_t>
>* param,
1217
const
char
* name,
const
char
* description=
""
);
1223
void
add
(
SGVector
<
SGSparseVector<float64_t>
>* param,
1224
const
char
* name,
const
char
* description=
""
);
1230
void
add
(
SGVector
<
SGSparseVector<floatmax_t>
>* param,
1231
const
char
* name,
const
char
* description=
""
);
1237
void
add
(
SGVector
<
SGSparseVector<complex128_t>
>* param,
1238
const
char
* name,
const
char
* description=
""
);
1239
1240
/* ************************************************************ */
1241
/* Matrix wrappers */
1242
1250
void
add_matrix
(
bool
** param,
1251
index_t
* length_y,
index_t
* length_x,
1252
const
char
* name,
const
char
* description=
""
);
1260
void
add_matrix
(
char
** param,
1261
index_t
* length_y,
index_t
* length_x,
1262
const
char
* name,
const
char
* description=
""
);
1270
void
add_matrix
(int8_t** param,
1271
index_t
* length_y,
index_t
* length_x,
1272
const
char
* name,
const
char
* description=
""
);
1280
void
add_matrix
(uint8_t** param,
1281
index_t
* length_y,
index_t
* length_x,
1282
const
char
* name,
const
char
* description=
""
);
1290
void
add_matrix
(int16_t** param,
1291
index_t
* length_y,
index_t
* length_x,
1292
const
char
* name,
const
char
* description=
""
);
1300
void
add_matrix
(uint16_t** param,
1301
index_t
* length_y,
index_t
* length_x,
1302
const
char
* name,
const
char
* description=
""
);
1310
void
add_matrix
(int32_t** param,
1311
index_t
* length_y,
index_t
* length_x,
1312
const
char
* name,
const
char
* description=
""
);
1320
void
add_matrix
(uint32_t** param,
1321
index_t
* length_y,
index_t
* length_x,
1322
const
char
* name,
const
char
* description=
""
);
1330
void
add_matrix
(int64_t** param,
1331
index_t
* length_y,
index_t
* length_x,
1332
const
char
* name,
const
char
* description=
""
);
1340
void
add_matrix
(uint64_t** param,
1341
index_t
* length_y,
index_t
* length_x,
1342
const
char
* name,
const
char
* description=
""
);
1350
void
add_matrix
(
float32_t
** param,
1351
index_t
* length_y,
index_t
* length_x,
1352
const
char
* name,
const
char
* description=
""
);
1360
void
add_matrix
(
float64_t
** param,
1361
index_t
* length_y,
index_t
* length_x,
1362
const
char
* name,
const
char
* description=
""
);
1370
void
add_matrix
(
floatmax_t
** param,
1371
index_t
* length_y,
index_t
* length_x,
1372
const
char
* name,
const
char
* description=
""
);
1380
void
add_matrix
(
complex128_t
** param,
1381
index_t
* length_y,
index_t
* length_x,
1382
const
char
* name,
const
char
* description=
""
);
1390
void
add_matrix
(
CSGObject
*** param,
1391
index_t
* length_y,
index_t
* length_x,
1392
const
char
* name,
const
char
* description=
""
);
1400
void
add_matrix
(
SGString<bool>
** param,
1401
index_t
* length_y,
index_t
* length_x,
1402
const
char
* name,
const
char
* description=
""
);
1410
void
add_matrix
(
SGString<char>
** param,
1411
index_t
* length_y,
index_t
* length_x,
1412
const
char
* name,
const
char
* description=
""
);
1420
void
add_matrix
(
SGString<int8_t>
** param,
1421
index_t
* length_y,
index_t
* length_x,
1422
const
char
* name,
const
char
* description=
""
);
1430
void
add_matrix
(
SGString<uint8_t>
** param,
1431
index_t
* length_y,
index_t
* length_x,
1432
const
char
* name,
const
char
* description=
""
);
1440
void
add_matrix
(
SGString<int16_t>
** param,
1441
index_t
* length_y,
index_t
* length_x,
1442
const
char
* name,
const
char
* description=
""
);
1450
void
add_matrix
(
SGString<uint16_t>
** param,
1451
index_t
* length_y,
index_t
* length_x,
1452
const
char
* name,
const
char
* description=
""
);
1460
void
add_matrix
(
SGString<int32_t>
** param,
1461
index_t
* length_y,
index_t
* length_x,
1462
const
char
* name,
const
char
* description=
""
);
1470
void
add_matrix
(
SGString<uint32_t>
** param,
1471
index_t
* length_y,
index_t
* length_x,
1472
const
char
* name,
const
char
* description=
""
);
1480
void
add_matrix
(
SGString<int64_t>
** param,
1481
index_t
* length_y,
index_t
* length_x,
1482
const
char
* name,
const
char
* description=
""
);
1490
void
add_matrix
(
SGString<uint64_t>
** param,
1491
index_t
* length_y,
index_t
* length_x,
1492
const
char
* name,
const
char
* description=
""
);
1500
void
add_matrix
(
SGString<float32_t>
** param,
1501
index_t
* length_y,
index_t
* length_x,
1502
const
char
* name,
const
char
* description=
""
);
1510
void
add_matrix
(
SGString<float64_t>
** param,
1511
index_t
* length_y,
index_t
* length_x,
1512
const
char
* name,
const
char
* description=
""
);
1520
void
add_matrix
(
SGString<floatmax_t>
** param,
1521
index_t
* length_y,
index_t
* length_x,
1522
const
char
* name,
const
char
* description=
""
);
1530
void
add_matrix
(
SGSparseVector<bool>
** param,
1531
index_t
* length_y,
index_t
* length_x,
1532
const
char
* name,
const
char
* description=
""
);
1540
void
add_matrix
(
SGSparseVector<char>
** param,
1541
index_t
* length_y,
index_t
* length_x,
1542
const
char
* name,
const
char
* description=
""
);
1550
void
add_matrix
(
SGSparseVector<int8_t>
** param,
1551
index_t
* length_y,
index_t
* length_x,
1552
const
char
* name,
const
char
* description=
""
);
1560
void
add_matrix
(
SGSparseVector<uint8_t>
** param,
1561
index_t
* length_y,
index_t
* length_x,
1562
const
char
* name,
const
char
* description=
""
);
1570
void
add_matrix
(
SGSparseVector<int16_t>
** param,
1571
index_t
* length_y,
index_t
* length_x,
1572
const
char
* name,
const
char
* description=
""
);
1580
void
add_matrix
(
SGSparseVector<uint16_t>
** param,
1581
index_t
* length_y,
index_t
* length_x,
1582
const
char
* name,
const
char
* description=
""
);
1590
void
add_matrix
(
SGSparseVector<int32_t>
** param,
1591
index_t
* length_y,
index_t
* length_x,
1592
const
char
* name,
const
char
* description=
""
);
1600
void
add_matrix
(
SGSparseVector<uint32_t>
** param,
1601
index_t
* length_y,
index_t
* length_x,
1602
const
char
* name,
const
char
* description=
""
);
1610
void
add_matrix
(
SGSparseVector<int64_t>
** param,
1611
index_t
* length_y,
index_t
* length_x,
1612
const
char
* name,
const
char
* description=
""
);
1620
void
add_matrix
(
SGSparseVector<uint64_t>
** param,
1621
index_t
* length_y,
index_t
* length_x,
1622
const
char
* name,
const
char
* description=
""
);
1630
void
add_matrix
(
SGSparseVector<float32_t>
** param,
1631
index_t
* length_y,
index_t
* length_x,
1632
const
char
* name,
const
char
* description=
""
);
1640
void
add_matrix
(
SGSparseVector<float64_t>
** param,
1641
index_t
* length_y,
index_t
* length_x,
1642
const
char
* name,
const
char
* description=
""
);
1650
void
add_matrix
(
SGSparseVector<floatmax_t>
** param,
1651
index_t
* length_y,
index_t
* length_x,
1652
const
char
* name,
const
char
* description=
""
);
1660
void
add_matrix
(
SGSparseVector<complex128_t>
** param,
1661
index_t
* length_y,
index_t
* length_x,
1662
const
char
* name,
const
char
* description=
""
);
1668
void
add
(
SGMatrix<bool>
* param,
const
char
* name,
1669
const
char
* description=
""
);
1675
void
add
(
SGMatrix<char>
* param,
const
char
* name,
1676
const
char
* description=
""
);
1682
void
add
(
SGMatrix<int8_t>
* param,
const
char
* name,
1683
const
char
* description=
""
);
1689
void
add
(
SGMatrix<uint8_t>
* param,
const
char
* name,
1690
const
char
* description=
""
);
1696
void
add
(
SGMatrix<int16_t>
* param,
const
char
* name,
1697
const
char
* description=
""
);
1703
void
add
(
SGMatrix<uint16_t>
* param,
const
char
* name,
1704
const
char
* description=
""
);
1710
void
add
(
SGMatrix<int32_t>
* param,
const
char
* name,
1711
const
char
* description=
""
);
1717
void
add
(
SGMatrix<uint32_t>
* param,
const
char
* name,
1718
const
char
* description=
""
);
1724
void
add
(
SGMatrix<int64_t>
* param,
const
char
* name,
1725
const
char
* description=
""
);
1731
void
add
(
SGMatrix<uint64_t>
* param,
const
char
* name,
1732
const
char
* description=
""
);
1738
void
add
(
SGMatrix<float32_t>
* param,
const
char
* name,
1739
const
char
* description=
""
);
1745
void
add
(
SGMatrix<float64_t>
* param,
const
char
* name,
1746
const
char
* description=
""
);
1752
void
add
(
SGMatrix<floatmax_t>
* param,
const
char
* name,
1753
const
char
* description=
""
);
1759
void
add
(
SGMatrix<complex128_t>
* param,
const
char
* name,
1760
const
char
* description=
""
);
1766
void
add
(
SGMatrix<CSGObject*>
* param,
const
char
* name,
1767
const
char
* description=
""
);
1773
void
add
(
SGMatrix
<
SGString<bool>
>* param,
const
char
* name,
1774
const
char
* description=
""
);
1780
void
add
(
SGMatrix
<
SGString<char>
>* param,
const
char
* name,
1781
const
char
* description=
""
);
1787
void
add
(
SGMatrix
<
SGString<int8_t>
>* param,
const
char
* name,
1788
const
char
* description=
""
);
1794
void
add
(
SGMatrix
<
SGString<uint8_t>
>* param,
const
char
* name,
1795
const
char
* description=
""
);
1801
void
add
(
SGMatrix
<
SGString<int16_t>
>* param,
const
char
* name,
1802
const
char
* description=
""
);
1808
void
add
(
SGMatrix
<
SGString<uint16_t>
>* param,
const
char
* name,
1809
const
char
* description=
""
);
1815
void
add
(
SGMatrix
<
SGString<int32_t>
>* param,
const
char
* name,
1816
const
char
* description=
""
);
1822
void
add
(
SGMatrix
<
SGString<uint32_t>
>* param,
const
char
* name,
1823
const
char
* description=
""
);
1829
void
add
(
SGMatrix
<
SGString<int64_t>
>* param,
const
char
* name,
1830
const
char
* description=
""
);
1836
void
add
(
SGMatrix
<
SGString<uint64_t>
>* param,
const
char
* name,
1837
const
char
* description=
""
);
1843
void
add
(
SGMatrix
<
SGString<float32_t>
>* param,
const
char
* name,
1844
const
char
* description=
""
);
1850
void
add
(
SGMatrix
<
SGString<float64_t>
>* param,
const
char
* name,
1851
const
char
* description=
""
);
1857
void
add
(
SGMatrix
<
SGString<floatmax_t>
>* param,
const
char
* name,
1858
const
char
* description=
""
);
1864
void
add
(
SGMatrix
<
SGSparseVector<bool>
>* param,
const
char
* name,
1865
const
char
* description=
""
);
1871
void
add
(
SGMatrix
<
SGSparseVector<char>
>* param,
const
char
* name,
1872
const
char
* description=
""
);
1878
void
add
(
SGMatrix
<
SGSparseVector<int8_t>
>* param,
const
char
* name,
1879
const
char
* description=
""
);
1885
void
add
(
SGMatrix
<
SGSparseVector<uint8_t>
>* param,
const
char
* name,
1886
const
char
* description=
""
);
1892
void
add
(
SGMatrix
<
SGSparseVector<int16_t>
>* param,
const
char
* name,
1893
const
char
* description=
""
);
1899
void
add
(
SGMatrix
<
SGSparseVector<uint16_t>
>* param,
1900
const
char
* name,
const
char
* description=
""
);
1906
void
add
(
SGMatrix
<
SGSparseVector<int32_t>
>* param,
const
char
* name,
1907
const
char
* description=
""
);
1913
void
add
(
SGMatrix
<
SGSparseVector<uint32_t>
>* param,
const
char
* name,
1914
const
char
* description=
""
);
1920
void
add
(
SGMatrix
<
SGSparseVector<int64_t>
>* param,
const
char
* name,
1921
const
char
* description=
""
);
1927
void
add
(
SGMatrix
<
SGSparseVector<uint64_t>
>* param,
1928
const
char
* name,
const
char
* description=
""
);
1934
void
add
(
SGMatrix
<
SGSparseVector<float32_t>
>* param,
1935
const
char
* name,
const
char
* description=
""
);
1941
void
add
(
SGMatrix
<
SGSparseVector<float64_t>
>* param,
1942
const
char
* name,
const
char
* description=
""
);
1948
void
add
(
SGMatrix
<
SGSparseVector<floatmax_t>
>* param,
1949
const
char
* name,
const
char
* description=
""
);
1955
void
add
(
SGMatrix
<
SGSparseVector<complex128_t>
>* param,
1956
const
char
* name,
const
char
* description=
""
);
1957
1963
void
add
(
SGSparseMatrix<bool>
* param,
1964
const
char
* name,
const
char
* description=
""
);
1970
void
add
(
SGSparseMatrix<char>
* param,
1971
const
char
* name,
const
char
* description=
""
);
1977
void
add
(
SGSparseMatrix<int8_t>
* param,
1978
const
char
* name,
const
char
* description=
""
);
1984
void
add
(
SGSparseMatrix<uint8_t>
* param,
1985
const
char
* name,
const
char
* description=
""
);
1991
void
add
(
SGSparseMatrix<int16_t>
* param,
1992
const
char
* name,
const
char
* description=
""
);
1998
void
add
(
SGSparseMatrix<uint16_t>
* param,
1999
const
char
* name,
const
char
* description=
""
);
2005
void
add
(
SGSparseMatrix<int32_t>
* param,
2006
const
char
* name,
const
char
* description=
""
);
2012
void
add
(
SGSparseMatrix<uint32_t>
* param,
2013
const
char
* name,
const
char
* description=
""
);
2019
void
add
(
SGSparseMatrix<int64_t>
* param,
2020
const
char
* name,
const
char
* description=
""
);
2026
void
add
(
SGSparseMatrix<uint64_t>
* param,
2027
const
char
* name,
const
char
* description=
""
);
2033
void
add
(
SGSparseMatrix<float32_t>
* param,
2034
const
char
* name,
const
char
* description=
""
);
2040
void
add
(
SGSparseMatrix<float64_t>
* param,
2041
const
char
* name,
const
char
* description=
""
);
2047
void
add
(
SGSparseMatrix<floatmax_t>
* param,
2048
const
char
* name,
const
char
* description=
""
);
2054
void
add
(
SGSparseMatrix<complex128_t>
* param,
2055
const
char
* name,
const
char
* description=
""
);
2061
void
add
(
SGSparseMatrix<CSGObject*>
* param,
2062
const
char
* name,
const
char
* description=
""
);
2063
protected
:
2064
2066
DynArray<TParameter*>
m_params
;
2067
2074
virtual
void
add_type
(
const
TSGDataType
* type,
void
* param,
2075
const
char
* name,
2076
const
char
* description);
2077
};
2078
}
2079
#endif //__PARAMETER_H__
SHOGUN
机器学习工具包 - 项目文档