This file is indexed.

/usr/lib/python2.7/dist-packages/fann2/libfann.py is in python-fann2 1:1.0.7-6build2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.10
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.





from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_libfann')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_libfann')
    _libfann = swig_import_helper()
    del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_libfann', [dirname(__file__)])
        except ImportError:
            import _libfann
            return _libfann
        if fp is not None:
            try:
                _mod = imp.load_module('_libfann', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _libfann = swig_import_helper()
    del swig_import_helper
else:
    import _libfann
del _swig_python_version_info
try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        if _newclass:
            object.__setattr__(self, name, value)
        else:
            self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)

try:
    _object = object
    _newclass = 1
except __builtin__.Exception:
    class _object:
        pass
    _newclass = 0

class SwigPyIterator(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _libfann.delete_SwigPyIterator
    __del__ = lambda self: None

    def value(self):
        return _libfann.SwigPyIterator_value(self)

    def incr(self, n=1):
        return _libfann.SwigPyIterator_incr(self, n)

    def decr(self, n=1):
        return _libfann.SwigPyIterator_decr(self, n)

    def distance(self, x):
        return _libfann.SwigPyIterator_distance(self, x)

    def equal(self, x):
        return _libfann.SwigPyIterator_equal(self, x)

    def copy(self):
        return _libfann.SwigPyIterator_copy(self)

    def next(self):
        return _libfann.SwigPyIterator_next(self)

    def __next__(self):
        return _libfann.SwigPyIterator___next__(self)

    def previous(self):
        return _libfann.SwigPyIterator_previous(self)

    def advance(self, n):
        return _libfann.SwigPyIterator_advance(self, n)

    def __eq__(self, x):
        return _libfann.SwigPyIterator___eq__(self, x)

    def __ne__(self, x):
        return _libfann.SwigPyIterator___ne__(self, x)

    def __iadd__(self, n):
        return _libfann.SwigPyIterator___iadd__(self, n)

    def __isub__(self, n):
        return _libfann.SwigPyIterator___isub__(self, n)

    def __add__(self, n):
        return _libfann.SwigPyIterator___add__(self, n)

    def __sub__(self, *args):
        return _libfann.SwigPyIterator___sub__(self, *args)
    def __iter__(self):
        return self
SwigPyIterator_swigregister = _libfann.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)

ERRORFUNC_LINEAR = _libfann.ERRORFUNC_LINEAR
ERRORFUNC_TANH = _libfann.ERRORFUNC_TANH
STOPFUNC_MSE = _libfann.STOPFUNC_MSE
STOPFUNC_BIT = _libfann.STOPFUNC_BIT
TRAIN_INCREMENTAL = _libfann.TRAIN_INCREMENTAL
TRAIN_BATCH = _libfann.TRAIN_BATCH
TRAIN_RPROP = _libfann.TRAIN_RPROP
TRAIN_QUICKPROP = _libfann.TRAIN_QUICKPROP
TRAIN_SARPROP = _libfann.TRAIN_SARPROP
LINEAR = _libfann.LINEAR
THRESHOLD = _libfann.THRESHOLD
THRESHOLD_SYMMETRIC = _libfann.THRESHOLD_SYMMETRIC
SIGMOID = _libfann.SIGMOID
SIGMOID_STEPWISE = _libfann.SIGMOID_STEPWISE
SIGMOID_SYMMETRIC = _libfann.SIGMOID_SYMMETRIC
SIGMOID_SYMMETRIC_STEPWISE = _libfann.SIGMOID_SYMMETRIC_STEPWISE
GAUSSIAN = _libfann.GAUSSIAN
GAUSSIAN_SYMMETRIC = _libfann.GAUSSIAN_SYMMETRIC
GAUSSIAN_STEPWISE = _libfann.GAUSSIAN_STEPWISE
ELLIOT = _libfann.ELLIOT
ELLIOT_SYMMETRIC = _libfann.ELLIOT_SYMMETRIC
LINEAR_PIECE = _libfann.LINEAR_PIECE
LINEAR_PIECE_SYMMETRIC = _libfann.LINEAR_PIECE_SYMMETRIC
SIN_SYMMETRIC = _libfann.SIN_SYMMETRIC
COS_SYMMETRIC = _libfann.COS_SYMMETRIC
LAYER = _libfann.LAYER
SHORTCUT = _libfann.SHORTCUT
class training_data_parent(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, training_data_parent, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, training_data_parent, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _libfann.new_training_data_parent(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _libfann.delete_training_data_parent
    __del__ = lambda self: None

    def destroy_train(self):
        return _libfann.training_data_parent_destroy_train(self)

    def read_train_from_file(self, filename):
        return _libfann.training_data_parent_read_train_from_file(self, filename)

    def save_train(self, filename):
        return _libfann.training_data_parent_save_train(self, filename)

    def save_train_to_fixed(self, filename, decimal_point):
        return _libfann.training_data_parent_save_train_to_fixed(self, filename, decimal_point)

    def shuffle_train_data(self):
        return _libfann.training_data_parent_shuffle_train_data(self)

    def merge_train_data(self, data):
        return _libfann.training_data_parent_merge_train_data(self, data)

    def length_train_data(self):
        return _libfann.training_data_parent_length_train_data(self)

    def num_input_train_data(self):
        return _libfann.training_data_parent_num_input_train_data(self)

    def num_output_train_data(self):
        return _libfann.training_data_parent_num_output_train_data(self)

    def get_input(self):
        return _libfann.training_data_parent_get_input(self)

    def get_output(self):
        return _libfann.training_data_parent_get_output(self)

    def set_train_data(self, num_data, num_input, input, num_output, output):
        return _libfann.training_data_parent_set_train_data(self, num_data, num_input, input, num_output, output)

    def create_train_from_callback(self, num_data, num_input, num_output, user_function):
        return _libfann.training_data_parent_create_train_from_callback(self, num_data, num_input, num_output, user_function)

    def scale_input_train_data(self, new_min, new_max):
        return _libfann.training_data_parent_scale_input_train_data(self, new_min, new_max)

    def scale_output_train_data(self, new_min, new_max):
        return _libfann.training_data_parent_scale_output_train_data(self, new_min, new_max)

    def scale_train_data(self, new_min, new_max):
        return _libfann.training_data_parent_scale_train_data(self, new_min, new_max)

    def subset_train_data(self, pos, length):
        return _libfann.training_data_parent_subset_train_data(self, pos, length)
training_data_parent_swigregister = _libfann.training_data_parent_swigregister
training_data_parent_swigregister(training_data_parent)

class neural_net_parent(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, neural_net_parent, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, neural_net_parent, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _libfann.new_neural_net_parent(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def copy_from_struct_fann(self, other):
        return _libfann.neural_net_parent_copy_from_struct_fann(self, other)
    __swig_destroy__ = _libfann.delete_neural_net_parent
    __del__ = lambda self: None

    def destroy(self):
        return _libfann.neural_net_parent_destroy(self)

    def create_standard(self, num_layers):
        return _libfann.neural_net_parent_create_standard(self, num_layers)

    def create_standard_array(self, num_layers, layers):
        return _libfann.neural_net_parent_create_standard_array(self, num_layers, layers)

    def create_sparse(self, connection_rate, num_layers):
        return _libfann.neural_net_parent_create_sparse(self, connection_rate, num_layers)

    def create_sparse_array(self, connection_rate, num_layers, layers):
        return _libfann.neural_net_parent_create_sparse_array(self, connection_rate, num_layers, layers)

    def create_shortcut(self, num_layers):
        return _libfann.neural_net_parent_create_shortcut(self, num_layers)

    def create_shortcut_array(self, num_layers, layers):
        return _libfann.neural_net_parent_create_shortcut_array(self, num_layers, layers)

    def run(self, input):
        return _libfann.neural_net_parent_run(self, input)

    def randomize_weights(self, min_weight, max_weight):
        return _libfann.neural_net_parent_randomize_weights(self, min_weight, max_weight)

    def init_weights(self, data):
        return _libfann.neural_net_parent_init_weights(self, data)

    def print_connections(self):
        return _libfann.neural_net_parent_print_connections(self)

    def create_from_file(self, configuration_file):
        return _libfann.neural_net_parent_create_from_file(self, configuration_file)

    def save(self, configuration_file):
        return _libfann.neural_net_parent_save(self, configuration_file)

    def save_to_fixed(self, configuration_file):
        return _libfann.neural_net_parent_save_to_fixed(self, configuration_file)

    def train(self, input, desired_output):
        return _libfann.neural_net_parent_train(self, input, desired_output)

    def train_epoch(self, data):
        return _libfann.neural_net_parent_train_epoch(self, data)

    def train_on_data(self, data, max_epochs, epochs_between_reports, desired_error):
        return _libfann.neural_net_parent_train_on_data(self, data, max_epochs, epochs_between_reports, desired_error)

    def train_on_file(self, filename, max_epochs, epochs_between_reports, desired_error):
        return _libfann.neural_net_parent_train_on_file(self, filename, max_epochs, epochs_between_reports, desired_error)

    def test(self, input, desired_output):
        return _libfann.neural_net_parent_test(self, input, desired_output)

    def test_data(self, data):
        return _libfann.neural_net_parent_test_data(self, data)

    def get_MSE(self):
        return _libfann.neural_net_parent_get_MSE(self)

    def reset_MSE(self):
        return _libfann.neural_net_parent_reset_MSE(self)

    def set_callback(self, callback, user_data):
        return _libfann.neural_net_parent_set_callback(self, callback, user_data)

    def print_parameters(self):
        return _libfann.neural_net_parent_print_parameters(self)

    def get_training_algorithm(self):
        return _libfann.neural_net_parent_get_training_algorithm(self)

    def set_training_algorithm(self, training_algorithm):
        return _libfann.neural_net_parent_set_training_algorithm(self, training_algorithm)

    def get_learning_rate(self):
        return _libfann.neural_net_parent_get_learning_rate(self)

    def set_learning_rate(self, learning_rate):
        return _libfann.neural_net_parent_set_learning_rate(self, learning_rate)

    def get_activation_function(self, layer, neuron):
        return _libfann.neural_net_parent_get_activation_function(self, layer, neuron)

    def set_activation_function(self, activation_function, layer, neuron):
        return _libfann.neural_net_parent_set_activation_function(self, activation_function, layer, neuron)

    def set_activation_function_layer(self, activation_function, layer):
        return _libfann.neural_net_parent_set_activation_function_layer(self, activation_function, layer)

    def set_activation_function_hidden(self, activation_function):
        return _libfann.neural_net_parent_set_activation_function_hidden(self, activation_function)

    def set_activation_function_output(self, activation_function):
        return _libfann.neural_net_parent_set_activation_function_output(self, activation_function)

    def get_activation_steepness(self, layer, neuron):
        return _libfann.neural_net_parent_get_activation_steepness(self, layer, neuron)

    def set_activation_steepness(self, steepness, layer, neuron):
        return _libfann.neural_net_parent_set_activation_steepness(self, steepness, layer, neuron)

    def set_activation_steepness_layer(self, steepness, layer):
        return _libfann.neural_net_parent_set_activation_steepness_layer(self, steepness, layer)

    def set_activation_steepness_hidden(self, steepness):
        return _libfann.neural_net_parent_set_activation_steepness_hidden(self, steepness)

    def set_activation_steepness_output(self, steepness):
        return _libfann.neural_net_parent_set_activation_steepness_output(self, steepness)

    def get_train_error_function(self):
        return _libfann.neural_net_parent_get_train_error_function(self)

    def set_train_error_function(self, train_error_function):
        return _libfann.neural_net_parent_set_train_error_function(self, train_error_function)

    def get_quickprop_decay(self):
        return _libfann.neural_net_parent_get_quickprop_decay(self)

    def set_quickprop_decay(self, quickprop_decay):
        return _libfann.neural_net_parent_set_quickprop_decay(self, quickprop_decay)

    def get_quickprop_mu(self):
        return _libfann.neural_net_parent_get_quickprop_mu(self)

    def set_quickprop_mu(self, quickprop_mu):
        return _libfann.neural_net_parent_set_quickprop_mu(self, quickprop_mu)

    def get_rprop_increase_factor(self):
        return _libfann.neural_net_parent_get_rprop_increase_factor(self)

    def set_rprop_increase_factor(self, rprop_increase_factor):
        return _libfann.neural_net_parent_set_rprop_increase_factor(self, rprop_increase_factor)

    def get_rprop_decrease_factor(self):
        return _libfann.neural_net_parent_get_rprop_decrease_factor(self)

    def set_rprop_decrease_factor(self, rprop_decrease_factor):
        return _libfann.neural_net_parent_set_rprop_decrease_factor(self, rprop_decrease_factor)

    def get_rprop_delta_zero(self):
        return _libfann.neural_net_parent_get_rprop_delta_zero(self)

    def set_rprop_delta_zero(self, rprop_delta_zero):
        return _libfann.neural_net_parent_set_rprop_delta_zero(self, rprop_delta_zero)

    def get_rprop_delta_min(self):
        return _libfann.neural_net_parent_get_rprop_delta_min(self)

    def set_rprop_delta_min(self, rprop_delta_min):
        return _libfann.neural_net_parent_set_rprop_delta_min(self, rprop_delta_min)

    def get_rprop_delta_max(self):
        return _libfann.neural_net_parent_get_rprop_delta_max(self)

    def set_rprop_delta_max(self, rprop_delta_max):
        return _libfann.neural_net_parent_set_rprop_delta_max(self, rprop_delta_max)

    def get_sarprop_weight_decay_shift(self):
        return _libfann.neural_net_parent_get_sarprop_weight_decay_shift(self)

    def set_sarprop_weight_decay_shift(self, sarprop_weight_decay_shift):
        return _libfann.neural_net_parent_set_sarprop_weight_decay_shift(self, sarprop_weight_decay_shift)

    def get_sarprop_step_error_threshold_factor(self):
        return _libfann.neural_net_parent_get_sarprop_step_error_threshold_factor(self)

    def set_sarprop_step_error_threshold_factor(self, sarprop_step_error_threshold_factor):
        return _libfann.neural_net_parent_set_sarprop_step_error_threshold_factor(self, sarprop_step_error_threshold_factor)

    def get_sarprop_step_error_shift(self):
        return _libfann.neural_net_parent_get_sarprop_step_error_shift(self)

    def set_sarprop_step_error_shift(self, sarprop_step_error_shift):
        return _libfann.neural_net_parent_set_sarprop_step_error_shift(self, sarprop_step_error_shift)

    def get_sarprop_temperature(self):
        return _libfann.neural_net_parent_get_sarprop_temperature(self)

    def set_sarprop_temperature(self, sarprop_temperature):
        return _libfann.neural_net_parent_set_sarprop_temperature(self, sarprop_temperature)

    def get_num_input(self):
        return _libfann.neural_net_parent_get_num_input(self)

    def get_num_output(self):
        return _libfann.neural_net_parent_get_num_output(self)

    def get_total_neurons(self):
        return _libfann.neural_net_parent_get_total_neurons(self)

    def get_total_connections(self):
        return _libfann.neural_net_parent_get_total_connections(self)

    def get_network_type(self):
        return _libfann.neural_net_parent_get_network_type(self)

    def get_connection_rate(self):
        return _libfann.neural_net_parent_get_connection_rate(self)

    def get_num_layers(self):
        return _libfann.neural_net_parent_get_num_layers(self)

    def get_layer_array(self, layers):
        return _libfann.neural_net_parent_get_layer_array(self, layers)

    def get_bias_array(self, bias):
        return _libfann.neural_net_parent_get_bias_array(self, bias)

    def get_connection_array(self, connections):
        return _libfann.neural_net_parent_get_connection_array(self, connections)

    def set_weight_array(self, connections, num_connections):
        return _libfann.neural_net_parent_set_weight_array(self, connections, num_connections)

    def set_weight(self, from_neuron, to_neuron, weight):
        return _libfann.neural_net_parent_set_weight(self, from_neuron, to_neuron, weight)

    def get_learning_momentum(self):
        return _libfann.neural_net_parent_get_learning_momentum(self)

    def set_learning_momentum(self, learning_momentum):
        return _libfann.neural_net_parent_set_learning_momentum(self, learning_momentum)

    def get_train_stop_function(self):
        return _libfann.neural_net_parent_get_train_stop_function(self)

    def set_train_stop_function(self, train_stop_function):
        return _libfann.neural_net_parent_set_train_stop_function(self, train_stop_function)

    def get_bit_fail_limit(self):
        return _libfann.neural_net_parent_get_bit_fail_limit(self)

    def set_bit_fail_limit(self, bit_fail_limit):
        return _libfann.neural_net_parent_set_bit_fail_limit(self, bit_fail_limit)

    def get_bit_fail(self):
        return _libfann.neural_net_parent_get_bit_fail(self)

    def cascadetrain_on_data(self, data, max_neurons, neurons_between_reports, desired_error):
        return _libfann.neural_net_parent_cascadetrain_on_data(self, data, max_neurons, neurons_between_reports, desired_error)

    def cascadetrain_on_file(self, filename, max_neurons, neurons_between_reports, desired_error):
        return _libfann.neural_net_parent_cascadetrain_on_file(self, filename, max_neurons, neurons_between_reports, desired_error)

    def get_cascade_output_change_fraction(self):
        return _libfann.neural_net_parent_get_cascade_output_change_fraction(self)

    def set_cascade_output_change_fraction(self, cascade_output_change_fraction):
        return _libfann.neural_net_parent_set_cascade_output_change_fraction(self, cascade_output_change_fraction)

    def get_cascade_output_stagnation_epochs(self):
        return _libfann.neural_net_parent_get_cascade_output_stagnation_epochs(self)

    def set_cascade_output_stagnation_epochs(self, cascade_output_stagnation_epochs):
        return _libfann.neural_net_parent_set_cascade_output_stagnation_epochs(self, cascade_output_stagnation_epochs)

    def get_cascade_candidate_change_fraction(self):
        return _libfann.neural_net_parent_get_cascade_candidate_change_fraction(self)

    def set_cascade_candidate_change_fraction(self, cascade_candidate_change_fraction):
        return _libfann.neural_net_parent_set_cascade_candidate_change_fraction(self, cascade_candidate_change_fraction)

    def get_cascade_candidate_stagnation_epochs(self):
        return _libfann.neural_net_parent_get_cascade_candidate_stagnation_epochs(self)

    def set_cascade_candidate_stagnation_epochs(self, cascade_candidate_stagnation_epochs):
        return _libfann.neural_net_parent_set_cascade_candidate_stagnation_epochs(self, cascade_candidate_stagnation_epochs)

    def get_cascade_weight_multiplier(self):
        return _libfann.neural_net_parent_get_cascade_weight_multiplier(self)

    def set_cascade_weight_multiplier(self, cascade_weight_multiplier):
        return _libfann.neural_net_parent_set_cascade_weight_multiplier(self, cascade_weight_multiplier)

    def get_cascade_candidate_limit(self):
        return _libfann.neural_net_parent_get_cascade_candidate_limit(self)

    def set_cascade_candidate_limit(self, cascade_candidate_limit):
        return _libfann.neural_net_parent_set_cascade_candidate_limit(self, cascade_candidate_limit)

    def get_cascade_max_out_epochs(self):
        return _libfann.neural_net_parent_get_cascade_max_out_epochs(self)

    def set_cascade_max_out_epochs(self, cascade_max_out_epochs):
        return _libfann.neural_net_parent_set_cascade_max_out_epochs(self, cascade_max_out_epochs)

    def get_cascade_max_cand_epochs(self):
        return _libfann.neural_net_parent_get_cascade_max_cand_epochs(self)

    def set_cascade_max_cand_epochs(self, cascade_max_cand_epochs):
        return _libfann.neural_net_parent_set_cascade_max_cand_epochs(self, cascade_max_cand_epochs)

    def get_cascade_num_candidates(self):
        return _libfann.neural_net_parent_get_cascade_num_candidates(self)

    def get_cascade_activation_functions_count(self):
        return _libfann.neural_net_parent_get_cascade_activation_functions_count(self)

    def get_cascade_activation_functions(self):
        return _libfann.neural_net_parent_get_cascade_activation_functions(self)

    def set_cascade_activation_functions(self, cascade_activation_functions, cascade_activation_functions_count):
        return _libfann.neural_net_parent_set_cascade_activation_functions(self, cascade_activation_functions, cascade_activation_functions_count)

    def get_cascade_activation_steepnesses_count(self):
        return _libfann.neural_net_parent_get_cascade_activation_steepnesses_count(self)

    def get_cascade_activation_steepnesses(self):
        return _libfann.neural_net_parent_get_cascade_activation_steepnesses(self)

    def set_cascade_activation_steepnesses(self, cascade_activation_steepnesses, cascade_activation_steepnesses_count):
        return _libfann.neural_net_parent_set_cascade_activation_steepnesses(self, cascade_activation_steepnesses, cascade_activation_steepnesses_count)

    def get_cascade_num_candidate_groups(self):
        return _libfann.neural_net_parent_get_cascade_num_candidate_groups(self)

    def set_cascade_num_candidate_groups(self, cascade_num_candidate_groups):
        return _libfann.neural_net_parent_set_cascade_num_candidate_groups(self, cascade_num_candidate_groups)

    def scale_train(self, data):
        return _libfann.neural_net_parent_scale_train(self, data)

    def descale_train(self, data):
        return _libfann.neural_net_parent_descale_train(self, data)

    def set_input_scaling_params(self, data, new_input_min, new_input_max):
        return _libfann.neural_net_parent_set_input_scaling_params(self, data, new_input_min, new_input_max)

    def set_output_scaling_params(self, data, new_output_min, new_output_max):
        return _libfann.neural_net_parent_set_output_scaling_params(self, data, new_output_min, new_output_max)

    def set_scaling_params(self, data, new_input_min, new_input_max, new_output_min, new_output_max):
        return _libfann.neural_net_parent_set_scaling_params(self, data, new_input_min, new_input_max, new_output_min, new_output_max)

    def clear_scaling_params(self):
        return _libfann.neural_net_parent_clear_scaling_params(self)

    def scale_input(self, input_vector):
        return _libfann.neural_net_parent_scale_input(self, input_vector)

    def scale_output(self, output_vector):
        return _libfann.neural_net_parent_scale_output(self, output_vector)

    def descale_input(self, input_vector):
        return _libfann.neural_net_parent_descale_input(self, input_vector)

    def descale_output(self, output_vector):
        return _libfann.neural_net_parent_descale_output(self, output_vector)

    def set_error_log(self, log_file):
        return _libfann.neural_net_parent_set_error_log(self, log_file)

    def get_errno(self):
        return _libfann.neural_net_parent_get_errno(self)

    def reset_errno(self):
        return _libfann.neural_net_parent_reset_errno(self)

    def reset_errstr(self):
        return _libfann.neural_net_parent_reset_errstr(self)

    def get_errstr(self):
        return _libfann.neural_net_parent_get_errstr(self)

    def print_error(self):
        return _libfann.neural_net_parent_print_error(self)
neural_net_parent_swigregister = _libfann.neural_net_parent_swigregister
neural_net_parent_swigregister(neural_net_parent)

class training_data(training_data_parent):
    __swig_setmethods__ = {}
    for _s in [training_data_parent]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, training_data, name, value)
    __swig_getmethods__ = {}
    for _s in [training_data_parent]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, training_data, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _libfann.new_training_data(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _libfann.delete_training_data
    __del__ = lambda self: None

    def get_input(self):
        return _libfann.training_data_get_input(self)

    def get_output(self):
        return _libfann.training_data_get_output(self)

    def set_train_data(self, input, output):
        return _libfann.training_data_set_train_data(self, input, output)
training_data_swigregister = _libfann.training_data_swigregister
training_data_swigregister(training_data)

class neural_net(neural_net_parent):
    __swig_setmethods__ = {}
    for _s in [neural_net_parent]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, neural_net, name, value)
    __swig_getmethods__ = {}
    for _s in [neural_net_parent]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, neural_net, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _libfann.new_neural_net()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _libfann.delete_neural_net
    __del__ = lambda self: None

    def create_standard_array(self, layers):
        return _libfann.neural_net_create_standard_array(self, layers)

    def create_sparse_array(self, connection_rate, layers):
        return _libfann.neural_net_create_sparse_array(self, connection_rate, layers)

    def create_shortcut_array(self, layers):
        return _libfann.neural_net_create_shortcut_array(self, layers)

    def run(self, input):
        return _libfann.neural_net_run(self, input)

    def train(self, input, desired_output):
        return _libfann.neural_net_train(self, input, desired_output)

    def test(self, input, desired_output):
        return _libfann.neural_net_test(self, input, desired_output)

    def get_layer_array(self, ARGOUT):
        return _libfann.neural_net_get_layer_array(self, ARGOUT)

    def get_bias_array(self, ARGOUT):
        return _libfann.neural_net_get_bias_array(self, ARGOUT)

    def get_connection_array(self, ARGOUT):
        return _libfann.neural_net_get_connection_array(self, ARGOUT)

    def set_weight_array(self, connections):
        return _libfann.neural_net_set_weight_array(self, connections)

    def get_cascade_activation_steepnesses(self):
        return _libfann.neural_net_get_cascade_activation_steepnesses(self)

    def set_cascade_activation_steepnesses(self, cascade_activation_steepnesses):
        return _libfann.neural_net_set_cascade_activation_steepnesses(self, cascade_activation_steepnesses)
neural_net_swigregister = _libfann.neural_net_swigregister
neural_net_swigregister(neural_net)

# This file is compatible with both classic and new-style classes.