# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# 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):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _openmtpk
else:
    import _openmtpk

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

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,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


class Basics(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def greatest_power(self, n, p):
        return _openmtpk.Basics_greatest_power(self, n, p)

    def op_gcd(self, x, y):
        return _openmtpk.Basics_op_gcd(self, x, y)

    def __init__(self):
        _openmtpk.Basics_swiginit(self, _openmtpk.new_Basics())
    __swig_destroy__ = _openmtpk.delete_Basics

# Register Basics in _openmtpk:
_openmtpk.Basics_swigregister(Basics)

class Calculus(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def derivative_term(self, p_term, val):
        return _openmtpk.Calculus_derivative_term(self, p_term, val)

    def deriv_at(self, poly, val):
        return _openmtpk.Calculus_deriv_at(self, poly, val)

    def deriv(self, poly):
        return _openmtpk.Calculus_deriv(self, poly)

    def __init__(self):
        _openmtpk.Calculus_swiginit(self, _openmtpk.new_Calculus())
    __swig_destroy__ = _openmtpk.delete_Calculus

# Register Calculus in _openmtpk:
_openmtpk.Calculus_swigregister(Calculus)

class BayesNet(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _openmtpk.BayesNet_swiginit(self, _openmtpk.new_BayesNet())
    __swig_destroy__ = _openmtpk.delete_BayesNet

# Register BayesNet in _openmtpk:
_openmtpk.BayesNet_swigregister(BayesNet)

class regression(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _openmtpk.regression_swiginit(self, _openmtpk.new_regression())

    def calculate_coeffecient(self):
        return _openmtpk.regression_calculate_coeffecient(self)

    def calculate_constant(self):
        return _openmtpk.regression_calculate_constant(self)

    def data_size(self):
        return _openmtpk.regression_data_size(self)

    def return_coeffecient(self):
        return _openmtpk.regression_return_coeffecient(self)

    def return_constant(self):
        return _openmtpk.regression_return_constant(self)

    def best_fit(self):
        return _openmtpk.regression_best_fit(self)

    def get_input(self, n):
        return _openmtpk.regression_get_input(self, n)

    def show_data(self):
        return _openmtpk.regression_show_data(self)

    def predict(self, x):
        return _openmtpk.regression_predict(self, x)

    def error_square(self):
        return _openmtpk.regression_error_square(self)

    def error_in(self, num):
        return _openmtpk.regression_error_in(self, num)
    __swig_destroy__ = _openmtpk.delete_regression

# Register regression in _openmtpk:
_openmtpk.regression_swigregister(regression)


def num_rows(input):
    return _openmtpk.num_rows(input)
class Primality(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def is_prime(self, n):
        return _openmtpk.Primality_is_prime(self, n)

    def compute_miller_rabin(self, d, n):
        return _openmtpk.Primality_compute_miller_rabin(self, d, n)

    def miller_rabin_prime(self, n, iters):
        return _openmtpk.Primality_miller_rabin_prime(self, n, iters)

    def miller_rabin(self, inters, min_val, max_val):
        return _openmtpk.Primality_miller_rabin(self, inters, min_val, max_val)

    def jacobian_number(self, a, n):
        return _openmtpk.Primality_jacobian_number(self, a, n)

    def solovoy_strassen(self, p, iters):
        return _openmtpk.Primality_solovoy_strassen(self, p, iters)

    def mod_pow(self, base, exponent, mod):
        return _openmtpk.Primality_mod_pow(self, base, exponent, mod)

    def carmichael_num(self, n):
        return _openmtpk.Primality_carmichael_num(self, n)

    def sieve_of_eratosthenes(self, n):
        return _openmtpk.Primality_sieve_of_eratosthenes(self, n)

    def pollard_rho(self, n):
        return _openmtpk.Primality_pollard_rho(self, n)

    def ETF(self, n):
        return _openmtpk.Primality_ETF(self, n)

    def __init__(self):
        _openmtpk.Primality_swiginit(self, _openmtpk.new_Primality())
    __swig_destroy__ = _openmtpk.delete_Primality

# Register Primality in _openmtpk:
_openmtpk.Primality_swigregister(Primality)

BITS = _openmtpk.BITS
BYTE_LIMIT = _openmtpk.BYTE_LIMIT
class RC4(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def byte_swap(self, a, b):
        return _openmtpk.RC4_byte_swap(self, a, b)

    def trad_swap(self, a, b):
        return _openmtpk.RC4_trad_swap(self, a, b)

    def XOR_swap(self, a, b):
        return _openmtpk.RC4_XOR_swap(self, a, b)

    def KSA(self, key, S, swap_type):
        return _openmtpk.RC4_KSA(self, key, S, swap_type)

    def PRGA(self, S, plaintext, ciphertext, swap_type):
        return _openmtpk.RC4_PRGA(self, S, plaintext, ciphertext, swap_type)

    def store_hash(self, plaintext, hashtext, swap_type):
        return _openmtpk.RC4_store_hash(self, plaintext, hashtext, swap_type)

    def compute(self, key, plaintext, hashtext, swap_type):
        return _openmtpk.RC4_compute(self, key, plaintext, hashtext, swap_type)

    def __init__(self):
        _openmtpk.RC4_swiginit(self, _openmtpk.new_RC4())
    __swig_destroy__ = _openmtpk.delete_RC4

# Register RC4 in _openmtpk:
_openmtpk.RC4_swigregister(RC4)

class Cipher(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def C_cipher(self, plaintext, key):
        return _openmtpk.Cipher_C_cipher(self, plaintext, key)

    def KC_encode(self, key):
        return _openmtpk.Cipher_KC_encode(self, key)

    def KC_cipher(self, plaintext, encoded_text):
        return _openmtpk.Cipher_KC_cipher(self, plaintext, encoded_text)

    def __init__(self):
        _openmtpk.Cipher_swiginit(self, _openmtpk.new_Cipher())
    __swig_destroy__ = _openmtpk.delete_Cipher

# Register Cipher in _openmtpk:
_openmtpk.Cipher_swigregister(Cipher)



