# This file was created automatically by SWIG.
# Don't modify this file, modify the SWIG interface instead.
# This file is compatible with both classic and new-style classes.

import _Sparsa

def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
    if (name == "this"):
        if isinstance(value, class_type):
            self.__dict__[name] = value.this
            if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
            del value.thisown
            return
    method = class_type.__swig_setmethods__.get(name,None)
    if method: return method(self,value)
    if (not static) or hasattr(self,name) or (name == "thisown"):
        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):
    method = class_type.__swig_getmethods__.get(name,None)
    if method: return method(self)
    raise AttributeError,name

import types
try:
    _object = types.ObjectType
    _newclass = 1
except AttributeError:
    class _object : pass
    _newclass = 0
del types


class Sparsa3A(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, Sparsa3A, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, Sparsa3A, name)
    def __repr__(self):
        return "<%s.%s; proxy of C++ Sparsa3A instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
    def __init__(self, *args):
        _swig_setattr(self, Sparsa3A, 'this', _Sparsa.new_Sparsa3A(*args))
        _swig_setattr(self, Sparsa3A, 'thisown', 1)
    def Moltiplica(*args): return _Sparsa.Sparsa3A_Moltiplica(*args)
    def MoltiplicaMinus(*args): return _Sparsa.Sparsa3A_MoltiplicaMinus(*args)
    def MoltiplicaDiag(*args): return _Sparsa.Sparsa3A_MoltiplicaDiag(*args)
    def MoltiplicaDiagMinus(*args): return _Sparsa.Sparsa3A_MoltiplicaDiagMinus(*args)
    def gohersch(*args): return _Sparsa.Sparsa3A_gohersch(*args)
    def goherschMin(*args): return _Sparsa.Sparsa3A_goherschMin(*args)
    def goherschMax(*args): return _Sparsa.Sparsa3A_goherschMax(*args)
    def trasforma(*args): return _Sparsa.Sparsa3A_trasforma(*args)
    __swig_setmethods__["dim"] = _Sparsa.Sparsa3A_dim_set
    __swig_getmethods__["dim"] = _Sparsa.Sparsa3A_dim_get
    if _newclass:dim = property(_Sparsa.Sparsa3A_dim_get, _Sparsa.Sparsa3A_dim_set)
    __swig_setmethods__["dim2"] = _Sparsa.Sparsa3A_dim2_set
    __swig_getmethods__["dim2"] = _Sparsa.Sparsa3A_dim2_get
    if _newclass:dim2 = property(_Sparsa.Sparsa3A_dim2_get, _Sparsa.Sparsa3A_dim2_set)
    def __del__(self, destroy=_Sparsa.delete_Sparsa3A):
        try:
            if self.thisown: destroy(self)
        except: pass


class Sparsa3APtr(Sparsa3A):
    def __init__(self, this):
        _swig_setattr(self, Sparsa3A, 'this', this)
        if not hasattr(self,"thisown"): _swig_setattr(self, Sparsa3A, 'thisown', 0)
        _swig_setattr(self, Sparsa3A,self.__class__,Sparsa3A)
_Sparsa.Sparsa3A_swigregister(Sparsa3APtr)


diagonalizza4py = _Sparsa.diagonalizza4py

scalare = _Sparsa.scalare
class Array(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, Array, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, Array, name)
    def __repr__(self):
        return "<%s.%s; proxy of C++ Array instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
    def __init__(self, *args):
        _swig_setattr(self, Array, 'this', _Sparsa.new_Array(*args))
        _swig_setattr(self, Array, 'thisown', 1)
    def __del__(self, destroy=_Sparsa.delete_Array):
        try:
            if self.thisown: destroy(self)
        except: pass

    def __getitem__(*args): return _Sparsa.Array___getitem__(*args)
    def get_value(*args): return _Sparsa.Array_get_value(*args)
    def set_to_zero(*args): return _Sparsa.Array_set_to_zero(*args)
    def set_to_one(*args): return _Sparsa.Array_set_to_one(*args)
    def set_value(*args): return _Sparsa.Array_set_value(*args)
    def set_all_random(*args): return _Sparsa.Array_set_all_random(*args)
    def copy(*args): return _Sparsa.Array_copy(*args)
    def __iadd__(*args): return _Sparsa.Array___iadd__(*args)
    def len(*args): return _Sparsa.Array_len(*args)
    __swig_getmethods__["copy_to_a_from_b"] = lambda x: _Sparsa.Array_copy_to_a_from_b
    if _newclass:copy_to_a_from_b = staticmethod(_Sparsa.Array_copy_to_a_from_b)
    def copy_from_b(*args): return _Sparsa.Array_copy_from_b(*args)
    def add_from_vect(*args): return _Sparsa.Array_add_from_vect(*args)
    def add_from_vect_with_fact(*args): return _Sparsa.Array_add_from_vect_with_fact(*args)
    def set_indices_inv(*args): return _Sparsa.Array_set_indices_inv(*args)
    def set_indices(*args): return _Sparsa.Array_set_indices(*args)
    __swig_getmethods__["mat_mult"] = lambda x: _Sparsa.Array_mat_mult
    if _newclass:mat_mult = staticmethod(_Sparsa.Array_mat_mult)
    def get_numarrayview(*args): return _Sparsa.Array_get_numarrayview(*args)
    def dividebyarray(*args): return _Sparsa.Array_dividebyarray(*args)
    def dataAddress(*args): return _Sparsa.Array_dataAddress(*args)
    def dumptofile(*args): return _Sparsa.Array_dumptofile(*args)
    __swig_getmethods__["scalare"] = lambda x: _Sparsa.Array_scalare
    if _newclass:scalare = staticmethod(_Sparsa.Array_scalare)
    __swig_getmethods__["sqrtscalare"] = lambda x: _Sparsa.Array_sqrtscalare
    if _newclass:sqrtscalare = staticmethod(_Sparsa.Array_sqrtscalare)
    def normalizza(*args): return _Sparsa.Array_normalizza(*args)
    def normalizzaauto(*args): return _Sparsa.Array_normalizzaauto(*args)
    def mult_by_fact(*args): return _Sparsa.Array_mult_by_fact(*args)

class ArrayPtr(Array):
    def __init__(self, this):
        _swig_setattr(self, Array, 'this', this)
        if not hasattr(self,"thisown"): _swig_setattr(self, Array, 'thisown', 0)
        _swig_setattr(self, Array,self.__class__,Array)
_Sparsa.Array_swigregister(ArrayPtr)

Array_copy_to_a_from_b = _Sparsa.Array_copy_to_a_from_b

Array_mat_mult = _Sparsa.Array_mat_mult

Array_scalare = _Sparsa.Array_scalare

Array_sqrtscalare = _Sparsa.Array_sqrtscalare


