File: m_matrix.py

package info (click to toggle)
gnucap-python 0.0.2-1.1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,672 kB
  • sloc: python: 7,873; sh: 4,384; cpp: 1,786; makefile: 252
file content (403 lines) | stat: -rw-r--r-- 12,631 bytes parent folder | download | duplicates (2)
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
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# 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, '_m_matrix')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_m_matrix')
    _m_matrix = 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('_m_matrix', [dirname(__file__)])
        except ImportError:
            import _m_matrix
            return _m_matrix
        try:
            _mod = imp.load_module('_m_matrix', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _m_matrix = swig_import_helper()
    del swig_import_helper
else:
    import _m_matrix
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

try:
    import weakref
    weakref_proxy = weakref.proxy
except __builtin__.Exception:
    weakref_proxy = lambda x: x


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__ = _m_matrix.delete_SwigPyIterator
    __del__ = lambda self: None

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

BUFLEN = _m_matrix.BUFLEN
BIGBUFLEN = _m_matrix.BIGBUFLEN
I_PROMPT = _m_matrix.I_PROMPT
CKT_PROMPT = _m_matrix.CKT_PROMPT
ANTI_COMMENT = _m_matrix.ANTI_COMMENT
ENDDIR = _m_matrix.ENDDIR
PATHSEP = _m_matrix.PATHSEP
STEPFILE = _m_matrix.STEPFILE
rPRE_MAIN = _m_matrix.rPRE_MAIN
rPRESET = _m_matrix.rPRESET
rINTERACTIVE = _m_matrix.rINTERACTIVE
rSCRIPT = _m_matrix.rSCRIPT
rBATCH = _m_matrix.rBATCH
class ENV(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ENV, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ENV, name)
    __repr__ = _swig_repr
    __swig_setmethods__["run_mode"] = _m_matrix.ENV_run_mode_set
    __swig_getmethods__["run_mode"] = _m_matrix.ENV_run_mode_get
    if _newclass:
        run_mode = _swig_property(_m_matrix.ENV_run_mode_get, _m_matrix.ENV_run_mode_set)

    def __init__(self):
        this = _m_matrix.new_ENV()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _m_matrix.delete_ENV
    __del__ = lambda self: None
ENV_swigregister = _m_matrix.ENV_swigregister
ENV_swigregister(ENV)
cvar = _m_matrix.cvar

class COMPLEX_array_t(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, COMPLEX_array_t, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, COMPLEX_array_t, name)
    __repr__ = _swig_repr
    __swig_setmethods__["_t"] = _m_matrix.COMPLEX_array_t__t_set
    __swig_getmethods__["_t"] = _m_matrix.COMPLEX_array_t__t_get
    if _newclass:
        _t = _swig_property(_m_matrix.COMPLEX_array_t__t_get, _m_matrix.COMPLEX_array_t__t_set)

    def __getitem__(self, i):
        return _m_matrix.COMPLEX_array_t___getitem__(self, i)

    def __setitem__(self, i, a):
        return _m_matrix.COMPLEX_array_t___setitem__(self, i, a)

    def __init__(self):
        this = _m_matrix.new_COMPLEX_array_t()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _m_matrix.delete_COMPLEX_array_t
    __del__ = lambda self: None
COMPLEX_array_t_swigregister = _m_matrix.COMPLEX_array_t_swigregister
COMPLEX_array_t_swigregister(COMPLEX_array_t)

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

    def __init__(self, ss=0):
        this = _m_matrix.new_BSMATRIXd(ss)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def iwant(self, arg2, arg3):
        return _m_matrix.BSMATRIXd_iwant(self, arg2, arg3)

    def unallocate(self):
        return _m_matrix.BSMATRIXd_unallocate(self)

    def allocate(self):
        return _m_matrix.BSMATRIXd_allocate(self)

    def reallocate(self):
        return _m_matrix.BSMATRIXd_reallocate(self)

    def size(self):
        return _m_matrix.BSMATRIXd_size(self)

    def density(self):
        return _m_matrix.BSMATRIXd_density(self)

    def zero(self):
        return _m_matrix.BSMATRIXd_zero(self)

    def dezero(self, o):
        return _m_matrix.BSMATRIXd_dezero(self, o)

    def load_diagonal_point(self, i, value):
        return _m_matrix.BSMATRIXd_load_diagonal_point(self, i, value)

    def load_point(self, i, j, value):
        return _m_matrix.BSMATRIXd_load_point(self, i, j, value)

    def load_couple(self, i, j, value):
        return _m_matrix.BSMATRIXd_load_couple(self, i, j, value)

    def load_symmetric(self, i, j, value):
        return _m_matrix.BSMATRIXd_load_symmetric(self, i, j, value)

    def load_asymmetric(self, r1, r2, c1, c2, value):
        return _m_matrix.BSMATRIXd_load_asymmetric(self, r1, r2, c1, c2, value)

    def lu_decomp(self, *args):
        return _m_matrix.BSMATRIXd_lu_decomp(self, *args)

    def fbsub(self, x, b, c=None):
        return _m_matrix.BSMATRIXd_fbsub(self, x, b, c)

    def d(self, r, arg3):
        return _m_matrix.BSMATRIXd_d(self, r, arg3)
    __swig_destroy__ = _m_matrix.delete_BSMATRIXd
    __del__ = lambda self: None
BSMATRIXd_swigregister = _m_matrix.BSMATRIXd_swigregister
BSMATRIXd_swigregister(BSMATRIXd)

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

    def __init__(self, ss=0):
        this = _m_matrix.new_BSMATRIXc(ss)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def iwant(self, arg2, arg3):
        return _m_matrix.BSMATRIXc_iwant(self, arg2, arg3)

    def unallocate(self):
        return _m_matrix.BSMATRIXc_unallocate(self)

    def allocate(self):
        return _m_matrix.BSMATRIXc_allocate(self)

    def reallocate(self):
        return _m_matrix.BSMATRIXc_reallocate(self)

    def size(self):
        return _m_matrix.BSMATRIXc_size(self)

    def density(self):
        return _m_matrix.BSMATRIXc_density(self)

    def zero(self):
        return _m_matrix.BSMATRIXc_zero(self)

    def dezero(self, o):
        return _m_matrix.BSMATRIXc_dezero(self, o)

    def load_diagonal_point(self, i, value):
        return _m_matrix.BSMATRIXc_load_diagonal_point(self, i, value)

    def load_point(self, i, j, value):
        return _m_matrix.BSMATRIXc_load_point(self, i, j, value)

    def load_couple(self, i, j, value):
        return _m_matrix.BSMATRIXc_load_couple(self, i, j, value)

    def load_symmetric(self, i, j, value):
        return _m_matrix.BSMATRIXc_load_symmetric(self, i, j, value)

    def load_asymmetric(self, r1, r2, c1, c2, value):
        return _m_matrix.BSMATRIXc_load_asymmetric(self, r1, r2, c1, c2, value)

    def lu_decomp(self, *args):
        return _m_matrix.BSMATRIXc_lu_decomp(self, *args)

    def fbsub(self, x, b, c=None):
        return _m_matrix.BSMATRIXc_fbsub(self, x, b, c)

    def d(self, r, arg3):
        return _m_matrix.BSMATRIXc_d(self, r, arg3)

    def fbsub_(self, x):
        return _m_matrix.BSMATRIXc_fbsub_(self, x)

    def __repr__(self):
        return _m_matrix.BSMATRIXc___repr__(self)

    def __getitem__(self, p):
        return _m_matrix.BSMATRIXc___getitem__(self, p)

    def data_(self):
        return _m_matrix.BSMATRIXc_data_(self)

    def _space(self, gnd=True):
        return _m_matrix.BSMATRIXc__space(self, gnd)

    def _coord(self, gnd):
        return _m_matrix.BSMATRIXc__coord(self, gnd)
    __swig_destroy__ = _m_matrix.delete_BSMATRIXc
    __del__ = lambda self: None
BSMATRIXc_swigregister = _m_matrix.BSMATRIXc_swigregister
BSMATRIXc_swigregister(BSMATRIXc)

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

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined")

    def __repr__(self):
        return _m_matrix.BSCR___repr__(self)

    def __getitem__(self, *args):
        return _m_matrix.BSCR___getitem__(self, *args)
    __swig_destroy__ = _m_matrix.delete_BSCR
    __del__ = lambda self: None
BSCR_swigregister = _m_matrix.BSCR_swigregister
BSCR_swigregister(BSCR)

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