-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.json
562 lines (558 loc) · 27.7 KB
/
data.json
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
{
"global_info":
{
"link_to_api": null,
"api_key": null,
"page": "home page of the https://github.com/VIA-s-acc/Prac_Codes api",
"github": "https://github.com/VIA-s-acc/Prac_Codes",
"libs": {
"lineq": ["matrix_methods", "generator", "checker"]
},
"version": {
"major": 0,
"minor": 1,
"build": "Alpha",
"snap": 2,
"shortcut": "API-v0.1A2",
"explanation": "Second snapshot of API v0.1 Alpha build"
},
"GlobalRet":
{
"headers": {},
"path": null,
"full_path": null,
"script_root": null,
"url": null,
"base_url": null,
"url_root": null,
"host_url": null,
"host": null,
"method": null
}
},
"Instructions": {
"Return note":
{
"note": "All functions returns -> function return ( you can see it in data[Instructions][module_short][function_short][returns] ) and global return -> return[global_info] ( you can see in data[Instructions][Note][global_return] ) ",
"global_return":
{ "link_to_api": "link_to_api",
"api_key": "api_key",
"GlobalRet":
{
"headers": "request.headers",
"path": "request.path",
"full_path": "request.full_path",
"script_root": "request.script_root",
"url": "request.url",
"base_url": "request.base_url",
"url_root": "request.url_root",
"host_url": "request.host_url",
"host": "request.host",
"method": "request.method"
}
}
},
"lineq module (shortcut: lineq)":
{ "matrix_methods module (shortcut: mm)":
{
"Determinant calculator (shortcut: det)":
{
"name": "/det/",
"use":
{
"args": {
"type": "type POST data ( 'str' or 'list' )",
"matrix": "matrix POST data ( type(str) or type(list) )"
},
"pattern": "link_to_api/det/?type=type&matrix=matrix ( list or str )"
},
"Examples":
{
"example_str": "link_to_api/det/?matrix=1 2 3\n4 5 6\n7 8 9",
"example_list": "link_to_api/det/?type=list&matrix=[[1,2,3],[4,5,6],[7,8,9]]"
},
"returns": {
"result": "Determinant of the matrix (NULL if error)",
"error": "Error | NULL if not occupied",
"matrix": "Input matrix",
"spent": "Spent until end of processing",
"result_calc_time": "Calculating time"
}
},
"Maximal element of the matrix (shortcut: maxm)":
{
"name": "/max_m/",
"use":
{
"args": {
"type": "type POST data ( 'str' or 'list' )",
"matrix": "matrix POST data ( type(str) or type(list) )"
},
"pattern": "link_to_api/max_m/?type=type&matrix=matrix ( list or str )"
},
"Examples":
{
"example_str": "link_to_api/max_m/?matrix=1 2 3\n4 5 6\n7 8 9",
"example_list": "link_to_api/max_m/?type=list&matrix=[[1,2,3],[4,5,6],[7,8,9]]"
},
"returns": {
"result": "Maximal element of the matrix (NULL if error)",
"error": "Error | NULL if not occupied",
"matrix": "Input matrix",
"spent": "Spent until end of processing",
"result_calc_time": "Calculating time"
}
},
"LU decomposition (shortcut: lu)":
{
"name": "/lu/",
"use":
{
"args": {
"type": "type POST data ( 'str' or 'list' )",
"matrix": "matrix POST data ( type(str) or type(list) )"
},
"pattern": "link_to_api/lu/?type=type&matrix=matrix ( list or str )"
},
"Examples":
{
"example_str": "link_to_api/lu/?matrix=1 2 3\n4 5 6\n7 8 9",
"example_list": "link_to_api/lu/?type=list&matrix=[[1,2,3],[4,5,6],[7,8,9]]"
},
"returns": {
"result": "LU decomposition of the matrix dict('l',: (None if error), 'u',: (None if error))",
"error": "Error | NULL if not occupied",
"matrix": "Input matrix",
"spent": "Spent until end of processing",
"result_calc_time": "Calculating time"
}
},
"Cholesky decomposition v1 (A = LL^*) (shortcut: chl1)":
{
"name": "/cholv1/",
"use":
{
"args": {
"type": "type POST data ( 'str' or 'list' )",
"matrix": "matrix POST data ( type(str) or type(list) )"
},
"pattern": "link_to_api/cholv1/?type=type&matrix=matrix ( list or str )"
},
"Examples":
{
"example_str": "link_to_api/cholv1/?matrix=1 2 3\n4 5 6\n7 8 9",
"example_list": "link_to_api/cholv1/?type=list&matrix=[[1,2,3],[4,5,6],[7,8,9]]"
},
"returns": {
"result": "Cholesky decomposition of the matrix dict('l',: (None if error), 'u',: (None if error))",
"error": "Error | NULL if not occupied",
"matrix": "Input matrix",
"spent": "Spent until end of processing",
"result_calc_time": "Calculating time"
}
},
"Cholesky decomposition v2 (A = LDL^*) (shortcut: chl2)":
{
"name": "/cholv2/",
"use":
{
"args": {
"type": "type POST data ( 'str' or 'list' )",
"matrix": "matrix POST data ( type(str) or type(list) )"
},
"pattern": "link_to_api/cholv2/?type=type&matrix=matrix ( list or str )"
},
"Examples":
{
"example_str": "link_to_api/cholv2/?matrix=1 2 3\n4 5 6\n7 8 9",
"example_list": "link_to_api/cholv2/?type=list&matrix=[[1,2,3],[4,5,6],[7,8,9]]"
},
"returns": {
"result": "Cholesky decomposition of the matrix dict('l': (None if error), 'd': (None if error), 'u': (None if error))",
"error": "Error | NULL if not occupied",
"matrix": "Input matrix",
"spent": "Spent until end of processing",
"result_calc_time": "Calculating time"
}
},
"Inverse matrix (A_I*A = E) (shortcut: inv)":
{
"name": "/inv/",
"use":
{
"args": {
"type": "type POST data ( 'str' or 'list' )",
"matrix": "matrix POST data ( type(str) or type(list) )"
},
"pattern": "link_to_api/inv/?type=type&matrix=matrix ( list or str )"
},
"Examples":
{
"example_str": "link_to_api/inv/?matrix=1 2 3\n4 5 6\n7 8 9",
"example_list": "link_to_api/inv/?type=list&matrix=[[1,2,3],[4,5,6],[7,8,9]]"
},
"returns": {
"result": "inverted matrix (NULL if error)",
"error": "Error | NULL if not occupied",
"matrix": "Input matrix",
"spent": "Spent until end of processing",
"result_calc_time": "Calculating time"
}
},
"Sum of matrices (R = A + B) (shortcut: summ)":
{
"name": "/sum_m/",
"use":
{
"args": {
"type": "type POST data ( 'str' or 'list' )",
"matrix1": "matrix1 POST data ( type(str) or type(list) )",
"matrix2": "matrix2 POST data ( type(str) or type(list) )"
},
"pattern": "link_to_api/sum_m/?type=type&matrix1=matrix1&matrix2=matrix2 ( list or str )"
},
"Examples":
{
"example_str": "link_to_api/sum_m/?matrix1=1 2 3\n4 5 6\n7 8 9&matrix2 = 1 2 3\n4 5 6\n7 8 9",
"example_list": "link_to_api/sum_m/?type=list&matrix1=[[2,2,3],[4,5,5],[7,1.2,7]]&matrix2=[[1,2,3],[7,4,6],[7,1.2,7]]"
},
"returns": {
"result": "Sum matrix (NULL if error)",
"error": "Error | NULL if not occupied",
"matrix1": "Input matrix1",
"matrix2": "Input matrix2",
"spent": "Spent until end of processing",
"result_calc_time": "Calculating time"
}
},
"Multiplication of matrices (R = A * B) (shortcut: multm)":
{
"name": "/mult_m/",
"use":
{
"args": {
"type": "type POST data ( 'str' or 'list' )",
"matrix1": "matrix1 POST data ( type(str) or type(list) )",
"matrix2": "matrix2 POST data ( type(str) or type(list) )"
},
"pattern": "link_to_api/mult_m/?type=type&matrix1=matrix1&matrix2=matrix2 ( list or str )"
},
"Examples":
{
"example_str": "link_to_api/mult_m/?matrix1=1 2 3\n4 5 6\n7 8 9&matrix2 = 1 2 3\n4 5 6\n7 8 9",
"example_list": "link_to_api/mult_m/?type=list&matrix1=[[2,2,3],[4,5,5],[7,1.2,7]]&matrix2=[[1,2,3],[7,4,6],[7,1.2,7]]"
},
"returns": {
"result": "Multiplication matrix (NULL if error)",
"error": "Error | NULL if not occupied",
"matrix1": "Input matrix1",
"matrix2": "Input matrix2",
"spent": "Spent until end of processing",
"result_calc_time": "calculating time"
}
},
"Multiplication of matrice to scalar (R = A * scalar) (shortcut: multms)":
{
"name": "/mult_m/",
"use":
{
"args": {
"type": "type POST data ( 'str' or 'list' )",
"matrix1": "matrix POST data ( type(str) or type(list) )",
"double": "double POST data ( int | float )"
},
"pattern": "link_to_api/mult_m_s/?type=type&matrix=matrix1&double=double ( list or str for matrix, int or float for double )"
},
"Examples":
{
"example_str": "link_to_api/mult_m_s/?matrix=1 2 3\n4 5 6\n7 8 9&double=1.23",
"example_list": "link_to_api/mult_m_s/?type=list&matrix=[[2,2,3],[4,5,5],[7,1.2,7]]&double=1.23"
},
"returns": {
"result": "Multiplication matrix (NULL if error)",
"error": "Error | NULL if not occupied",
"matrix": "Input matrix",
"double": "Input double",
"spent": "Spent until end of processing",
"result_calc_time": "calculating time"
}
},
"Signum calculator (shortcut: sig)":
{
"name": "/sig/",
"use":
{
"args": {
"double": "double POST data ( int | float )"
},
"pattern": "link_to_api/sig/?double=double"
},
"Examples":
{
"example": "link_to_api/sig/?double=1.23"
},
"returns": {
"result": "Signum (NULL if error)",
"error": "Error | NULL if not occupied",
"double": "Input double",
"spent": "Spent until end of processing",
"result_calc_time": "Calculating time"
}
},
"Absolute value calculator (shortcut: abs)":
{
"name": "/abs/",
"use":
{
"args": {
"double": "double POST data ( int | float )"
},
"pattern": "link_to_api/abs/?double=double"
},
"Examples":
{
"example": "link_to_api/abs/?double=1.23"
},
"returns": {
"result": "abs value (NULL if error)",
"error": "Error | NULL if not occupied",
"double": "Input double",
"spent": "Spent until end of processing",
"result_calc_time": "Calculating time"
}
},
"Random value in range from dmin to dmax (shortcut: rnd)":
{
"name": "/rand/",
"use":
{
"args": {
"dmin": "double1 POST data ( int | float )",
"dmax": "double2 POST data ( int | float )"
},
"pattern": "link_to_api/rand/?dmin=dmin&dmax=dmax"
},
"Examples":
{
"example": "link_to_api/rand/?dmin1=1.23&dmax=1.43"
},
"returns": {
"result": "rand value (NULL if error)",
"error": "Error | NULL if not occupied",
"dmin": "Input double minimal (from dmin to dmax)",
"dmax": "Input double max",
"spent": "Spent until end of processing",
"result_calc_time": "Calculating time"
}
},
"Get (max, min) eigenvalues and eigenvectors of matrix (shortcut: eigmm)":
{
"name": "/eig_mm/",
"use":
{
"args": {
"type": "type POST data ( 'str' or 'list' )",
"matrix": "matrix POST data ( type(str) or type(list) )",
"itern": "int POST data ( int )",
"tol": "double POST data ( int | float )"
},
"pattern": "link_to_api/eig_mm/?type=type&matrix=matrix1&itern=itern&tol=double ( list or str for matrix, int or float for double )"
},
"Examples":
{
"example_str": "link_to_api/eig_mm/?matrix=1 2 3\n4 5 6\n7 8 9&itern=10&tol=0.01",
"example_list": "link_to_api/eig_mm/?type=list&matrix=[[2,2,3],[4,5,5],[7,1.2,7]]&itern=10&tol=0.01"
},
"returns": {
"result": "max, min eigenvalues and eigenvectors of matrix -> dict('max': {'eigenvalue': eigenvalue, 'eigenvector': eigenvector}, 'min': {'eigenvalue': eigenvalue, 'eigenvector': eigenvector}) (NULL if error)",
"error": "Error | NULL if not occupied",
"matrix": "Input matrix",
"iternm": "Input int itern",
"tol": "Input double tol",
"spent": "Spent until end of processing",
"result_calc_time": "calculating time"
}
},
"Get vector norm (shortcut: norm)":
{
"name": "/norm/",
"use":
{
"args": {
"type": "type POST data ( 'str' or 'list' )",
"vector": "vector POST data ( type(str) or type(list) )"
},
"pattern": "link_to_api/norm/?type=type&vector=vector ( list or str for vector)"
},
"Examples":
{
"example_str": "link_to_api/norm/?vector=1 2 3",
"example_list": "link_to_api/norm/?type=list&vector=[1,2,3]"
},
"returns": {
"result": "vector norm (NULL if error)",
"error": "Error | NULL if not occupied",
"vector": "Input vector",
"spent": "Spent until end of processing",
"result_calc_time": "calculating time"
}
},
"Approx two vectors (shortcut: approx)":
{
"name": "/approx/",
"use":
{
"args": {
"type": "type POST data ( 'str' or 'list' )",
"vector1": "vector1 POST data ( type(str) or type(list) )",
"vector2": "vector2 POST data ( type(str) or type(list) )"
},
"pattern": "link_to_api/approx/?type=type&vector1=vector1&vector2=vector2 ( list or str for vector)"
},
"Examples":
{
"example_str": "link_to_api/approx/?vector1=1 2 3&vector2=4 5 6",
"example_list": "link_to_api/approx/?type=list&vector1=[1,2,3]&vector2=[4,5,6]"
},
"returns": {
"result": "Approx result [True, False] (NULL if error)",
"error": "Error | NULL if not occupied",
"vector": "Input vector",
"spent": "Spent until end of processing",
"result_calc_time": "calculating time"
}
}
},
"generator module (shortcut: gntr)":
{
"Generate random matrix (shortcut: rndm)":
{
"name": "/rand_m/",
"use":
{
"args": {
"size": "size of matrix (NxN) (int)",
"rng": "range for random numbers (double) (a_ij may be in [min_rng, max_rng])",
"mode": "Mode for matrix generating -> mode_list = ['default': base random, '3diag': three diagonal, 'symm': symmetric] (str)"
},
"pattern": "link_to_api/rand_m/?size=size&rng=rng&mode=mode"
},
"Examples":
{
"example": "link_to_api/rand_m/?size=25&rng=1.132&mode=3diag"
},
"returns": {
"result": "Generated matrix (NULL if error)",
"error": "Error | NULL if not occupied",
"size": "Input size",
"rng": "Input rng",
"mode": "Input mode",
"spent": "Spent until end of processing",
"result_calc_time": "Calculating time"
}
},
"Generate random vector (shortcut: rndm)":
{
"name": "/rand_v/",
"use":
{
"args": {
"size": "size of vector (1xN) (int)",
"rng": "range for random numbers (double) (a_i may be in [min_rng, max_rng])"
},
"pattern": "link_to_api/rand_v/?size=size&rng=rng"
},
"Examples":
{
"example": "link_to_api/rand_v/?size=25&rng=1.132"
},
"returns": {
"result": "Generated vector (NULL if error)",
"error": "Error | NULL if not occupied",
"size": "Input size",
"rng": "Input rng",
"spent": "Spent until end of processing",
"result_calc_time": "Calculating time"
}
}
},
"checker module (shortcut: chk)":
{
"Diagonal dominance (shortcut: dd)":
{
"name": "/chk_dd/",
"use":
{
"args": {
"type": "type POST data ( 'str' or 'list' )",
"matrix": "matrix POST data ( type(str) or type(list) )"
},
"pattern": "link_to_api/chk_dd/?type=type&matrix=matrix ( list or str for matrix)"
},
"Examples":
{
"example_str": "link_to_api/chk_dd/?matrix=1 2 3\n4 5 6\n7 8 9",
"example_list": "link_to_api/chk_dd/?type=list&matrix=[[1,2,3],[4,5,6],[7,8,9]]"
},
"returns": {
"result": "Checker result (NULL if error)",
"error": "Error | NULL if not occupied",
"matrix": "Input matrix",
"type": "Input type",
"spent": "Spent until end of processing",
"result_calc_time": "Calculating time"
}
},
"Positive definite (sylvesters criterion) (shortcut: pd)":
{
"name": "/chk_pd/",
"use":
{
"args": {
"type": "type POST data ( 'str' or 'list' )",
"matrix": "matrix POST data ( type(str) or type(list) )"
},
"pattern": "link_to_api/chk_pd/?type=type&matrix=matrix ( list or str for matrix)"
},
"Examples":
{
"example_str": "link_to_api/chk_pd/?matrix=1 2 3\n4 5 6\n7 8 9",
"example_list": "link_to_api/chk_pd/?type=list&matrix=[[1,2,3],[4,5,6],[7,8,9]]"
},
"returns": {
"result": "Checker result (NULL if error)",
"error": "Error | NULL if not occupied",
"matrix": "Input matrix",
"type": "Input type",
"spent": "Spent until end of processing",
"result_calc_time": "Calculating time"
}
},
"Symmetric (shortcut: sy)":
{
"name": "/chk_sy/",
"use":
{
"args": {
"type": "type POST data ( 'str' or 'list' )",
"matrix": "matrix POST data ( type(str) or type(list) )"
}
},
"Examples":
{
"example_str": "link_to_api/chk_sy/?matrix=1 2 3\n4 5 6\n7 8 9",
"example_list": "link_to_api/chk_sy/?type=list&matrix=[[1,2,3],[4,5,6],[7,8,9]]"
},
"returns": {
"result": "Checker result (NULL if error)",
"error": "Error | NULL if not occupied",
"matrix": "Input matrix",
"type": "Input type",
"spent": "Spent until end of processing",
"result_calc_time": "Calculating time"
}
}
}
}
}
}