Skip to content

Commit

Permalink
#pygpmp: updates to SWIG interface files
Browse files Browse the repository at this point in the history
  • Loading branch information
akielaries committed May 12, 2024
1 parent 27d1845 commit be315ba
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ A Python example showing the same functionalities.
>>> from pygpmp import nt
>>> c = nt.Cipher()
>>> text0 = c.caesar('Plaintext', 5)
>>> print(ciphertext_0)
>>> print(text0)
Uqfnsyjcy
>>>
>>> text1 = c.caesar('ATTACKATONCE', 4)
Expand Down
4 changes: 2 additions & 2 deletions pygpmp/arithmetic/arithmetic.i
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
%include "std_string.i"

%{
#include "../../include/arithmetic.hpp"
#include "../../include/openGPMP/arithmetic.hpp"
using namespace gpmp;
%}

%include "../../include/arithmetic.hpp"
%include "../../include/openGPMP/arithmetic.hpp"

4 changes: 2 additions & 2 deletions pygpmp/calculus/calculus.i
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
%include "std_string.i"

%{
#include "../../include/calculus/differential.hpp"
#include "../../include/openGPMP/calculus/differential.hpp"
using namespace gpmp;
%}

%include "../../include/calculus/differential.hpp"
%include "../../include/openGPMP/calculus/differential.hpp"

8 changes: 4 additions & 4 deletions pygpmp/core/core.i
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
%include <stdint.i>

%{
#include "../../include/core/datatable.hpp"
#include "../../include/core/utils.hpp"
#include "../../include/openGPMP/core/datatable.hpp"
#include "../../include/openGPMP/core/utils.hpp"
//#include "../../include/core/threads.hpp"
using namespace gpmp;
%}

%include "../../include/core/datatable.hpp"
%include "../../include/core/utils.hpp"
%include "../../include/openGPMP/core/datatable.hpp"
%include "../../include/openGPMP/core/utils.hpp"
//%include "../../include/core/threads.hpp"

10 changes: 10 additions & 0 deletions pygpmp/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,14 @@ def log(self, level, message):

# Register Logger in _core:
_core.Logger_swigregister(Logger)
class Misc(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):
_core.Misc_swiginit(self, _core.new_Misc())
__swig_destroy__ = _core.delete_Misc

# Register Misc in _core:
_core.Misc_swigregister(Misc)

4 changes: 2 additions & 2 deletions pygpmp/linalg/linalg.i
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
%module linalg

%{
#include "../../include/linalg/mtx.hpp"
#include "../../include/openGPMP/linalg/mtx.hpp"
using namespace gpmp;
%}

%include "../../include/linalg/mtx.hpp"
%include "../../include/openGPMP/linalg/mtx.hpp"

4 changes: 2 additions & 2 deletions pygpmp/ml/ml.i
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
%include <stdint.i>

%{
#include "../../include/ml/linreg.hpp"
#include "../../include/openGPMP/ml/linreg.hpp"
using namespace gpmp;
%}

%include "../../include/ml/linreg.hpp"
%include "../../include/openGPMP/ml/linreg.hpp"

28 changes: 14 additions & 14 deletions pygpmp/nt/nt.i
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
%module nt

%{
#include "../../include/arithmetic.hpp"
#include "../../include/nt/prime_test.hpp"
#include "../../include/nt/prime_gen.hpp"
#include "../../include/nt/logarithms.hpp"
#include "../../include/nt/factorization.hpp"
#include "../../include/nt/rc4.hpp"
#include "../../include/nt/cipher.hpp"
#include "../../include/openGPMP/arithmetic.hpp"
#include "../../include/openGPMP/nt/prime_test.hpp"
#include "../../include/openGPMP/nt/prime_gen.hpp"
#include "../../include/openGPMP/nt/logarithms.hpp"
#include "../../include/openGPMP/nt/factorization.hpp"
#include "../../include/openGPMP/nt/rc4.hpp"
#include "../../include/openGPMP/nt/cipher.hpp"
using namespace gpmp;
%}

%include "../../include/arithmetic.hpp"
%include "../../include/nt/prime_test.hpp"
%include "../../include/nt/prime_gen.hpp"
%include "../../include/nt/logarithms.hpp"
%include "../../include/nt/factorization.hpp"
%include "../../include/nt/rc4.hpp"
%include "../../include/nt/cipher.hpp"
%include "../../include/openGPMP/arithmetic.hpp"
%include "../../include/openGPMP/nt/prime_test.hpp"
%include "../../include/openGPMP/nt/prime_gen.hpp"
%include "../../include/openGPMP/nt/logarithms.hpp"
%include "../../include/openGPMP/nt/factorization.hpp"
%include "../../include/openGPMP/nt/rc4.hpp"
%include "../../include/openGPMP/nt/cipher.hpp"

0 comments on commit be315ba

Please sign in to comment.