openGPMP
Open Source Mathematics Package
core.py
Go to the documentation of this file.
1 # This file was automatically generated by SWIG (https://www.swig.org).
2 # Version 4.1.0
3 #
4 # Do not make changes to this file unless you know what you are doing - modify
5 # the SWIG interface file instead.
6 
7 from sys import version_info as _swig_python_version_info
8 # Import the low-level C/C++ module
9 if __package__ or "." in __name__:
10  from . import _core
11 else:
12  import _core
13 
14 try:
15  import builtins as __builtin__
16 except ImportError:
17  import __builtin__
18 
19 def _swig_repr(self):
20  try:
21  strthis = "proxy of " + self.this.__repr__()
22  except __builtin__.Exception:
23  strthis = ""
24  return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
25 
26 
27 def _swig_setattr_nondynamic_instance_variable(set):
28  def set_instance_attr(self, name, value):
29  if name == "this":
30  set(self, name, value)
31  elif name == "thisown":
32  self.this.own(value)
33  elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
34  set(self, name, value)
35  else:
36  raise AttributeError("You cannot add instance attributes to %s" % self)
37  return set_instance_attr
38 
39 
40 def _swig_setattr_nondynamic_class_variable(set):
41  def set_class_attr(cls, name, value):
42  if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
43  set(cls, name, value)
44  else:
45  raise AttributeError("You cannot add class attributes to %s" % cls)
46  return set_class_attr
47 
48 
49 def _swig_add_metaclass(metaclass):
50  """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
51  def wrapper(cls):
52  return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
53  return wrapper
54 
55 
56 class _SwigNonDynamicMeta(type):
57  """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
58  __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
59 
60 
61 class SwigPyIterator(object):
62  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
63 
64  def __init__(self, *args, **kwargs):
65  raise AttributeError("No constructor defined - class is abstract")
66  __repr__ = _swig_repr
67  __swig_destroy__ = _core.delete_SwigPyIterator
68 
69  def value(self):
70  return _core.SwigPyIterator_value(self)
71 
72  def incr(self, n=1):
73  return _core.SwigPyIterator_incr(self, n)
74 
75  def decr(self, n=1):
76  return _core.SwigPyIterator_decr(self, n)
77 
78  def distance(self, x):
79  return _core.SwigPyIterator_distance(self, x)
80 
81  def equal(self, x):
82  return _core.SwigPyIterator_equal(self, x)
83 
84  def copy(self):
85  return _core.SwigPyIterator_copy(self)
86 
87  def next(self):
88  return _core.SwigPyIterator_next(self)
89 
90  def __next__(self):
91  return _core.SwigPyIterator___next__(self)
92 
93  def previous(self):
94  return _core.SwigPyIterator_previous(self)
95 
96  def advance(self, n):
97  return _core.SwigPyIterator_advance(self, n)
98 
99  def __eq__(self, x):
100  return _core.SwigPyIterator___eq__(self, x)
101 
102  def __ne__(self, x):
103  return _core.SwigPyIterator___ne__(self, x)
104 
105  def __iadd__(self, n):
106  return _core.SwigPyIterator___iadd__(self, n)
107 
108  def __isub__(self, n):
109  return _core.SwigPyIterator___isub__(self, n)
110 
111  def __add__(self, n):
112  return _core.SwigPyIterator___add__(self, n)
113 
114  def __sub__(self, *args):
115  return _core.SwigPyIterator___sub__(self, *args)
116  def __iter__(self):
117  return self
118 
119 # Register SwigPyIterator in _core:
120 _core.SwigPyIterator_swigregister(SwigPyIterator)
121 MAX_ROWS = _core.MAX_ROWS
122 SHOW_ROWS = _core.SHOW_ROWS
123 DataType_Unknown = _core.DataType_Unknown
124 DataType_String = _core.DataType_String
125 DataType_Integer = _core.DataType_Integer
126 DataType_Double = _core.DataType_Double
127 class DataTable(object):
128  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
129  __repr__ = _swig_repr
130 
131  def __init__(self):
132  _core.DataTable_swiginit(self, _core.new_DataTable())
133 
134  def csv_read(self, *args):
135  return _core.DataTable_csv_read(self, *args)
136 
137  def csv_write(self):
138  return _core.DataTable_csv_write(self)
139 
140  def tsv_read(self, *args):
141  return _core.DataTable_tsv_read(self, *args)
142 
143  def json_read(self, *args):
144  return _core.DataTable_json_read(self, *args)
145 
146  def datetime(self, column_name, extract_year=True, extract_month=True, extract_time=False):
147  return _core.DataTable_datetime(self, column_name, extract_year, extract_month, extract_time)
148 
149  def sort(self, sort_columns, ascending=True):
150  return _core.DataTable_sort(self, sort_columns, ascending)
151 
152  def group_by(self, group_by_columns):
153  return _core.DataTable_group_by(self, group_by_columns)
154 
155  def first(self, groups):
156  return _core.DataTable_first(self, groups)
157 
158  def describe(self):
159  return _core.DataTable_describe(self)
160 
161  def str_to_int(self, src):
162  return _core.DataTable_str_to_int(self, src)
163 
164  def str_to_double(self, src):
165  return _core.DataTable_str_to_double(self, src)
166 
167  def display(self, display_all=False):
168  return _core.DataTable_display(self, display_all)
169  __swig_destroy__ = _core.delete_DataTable
170 
171 # Register DataTable in _core:
172 _core.DataTable_swigregister(DataTable)
173 DEBUG = _core.DEBUG
174 INFO = _core.INFO
175 WARNING = _core.WARNING
176 ERROR = _core.ERROR
177 CONSOLE = _core.CONSOLE
178 FILE_ONLY = _core.FILE_ONLY
179 CONSOLE_AND_FILE = _core.CONSOLE_AND_FILE
180 class TypeCast(object):
181  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
182  __repr__ = _swig_repr
183 
184  def convert(self):
185  return _core.TypeCast_convert(self)
186 
187  def __init__(self):
188  _core.TypeCast_swiginit(self, _core.new_TypeCast())
189  __swig_destroy__ = _core.delete_TypeCast
190 
191 # Register TypeCast in _core:
192 _core.TypeCast_swigregister(TypeCast)
193 class Logger(object):
194  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
195  __repr__ = _swig_repr
196 
197  def __init__(self, level=INFO, useTimestamp=True):
198  _core.Logger_swiginit(self, _core.new_Logger(level, useTimestamp))
199  __swig_destroy__ = _core.delete_Logger
200 
201  def setLogLevel(self, level):
202  return _core.Logger_setLogLevel(self, level)
203 
204  def enableTimestamps(self, enable):
205  return _core.Logger_enableTimestamps(self, enable)
206 
207  def setLogDestination(self, destination):
208  return _core.Logger_setLogDestination(self, destination)
209 
210  def setLogFile(self, logFile):
211  return _core.Logger_setLogFile(self, logFile)
212 
213  def log(self, level, message):
214  return _core.Logger_log(self, level, message)
215 
216 # Register Logger in _core:
217 _core.Logger_swigregister(Logger)
218 class Misc(object):
219  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
220  __repr__ = _swig_repr
221 
222  def __init__(self):
223  _core.Misc_swiginit(self, _core.new_Misc())
224  __swig_destroy__ = _core.delete_Misc
225 
226 # Register Misc in _core:
227 _core.Misc_swigregister(Misc)
228 
def csv_read(self, *args)
Definition: core.py:134
def group_by(self, group_by_columns)
Definition: core.py:152
def first(self, groups)
Definition: core.py:155
def tsv_read(self, *args)
Definition: core.py:140
def sort(self, sort_columns, ascending=True)
Definition: core.py:149
def datetime(self, column_name, extract_year=True, extract_month=True, extract_time=False)
Definition: core.py:146
def json_read(self, *args)
Definition: core.py:143
def str_to_int(self, src)
Definition: core.py:161
def display(self, display_all=False)
Definition: core.py:167
def str_to_double(self, src)
Definition: core.py:164
def log(self, level, message)
Definition: core.py:213
def __init__(self, level=INFO, useTimestamp=True)
Definition: core.py:197
def setLogLevel(self, level)
Definition: core.py:201
def enableTimestamps(self, enable)
Definition: core.py:204
def setLogDestination(self, destination)
Definition: core.py:207
def setLogFile(self, logFile)
Definition: core.py:210
def __init__(self)
Definition: core.py:222
def __init__(self)
Definition: core.py:187