From 039408f817525acec7ef4b4845f912bdca0a5c09 Mon Sep 17 00:00:00 2001
From: Niklaus Johner <niklaus.johner@unibas.ch>
Date: Fri, 18 Sep 2015 14:34:48 +0200
Subject: [PATCH] Added 3 and 4-dimensional Float matrices.

---
 modules/base/pymod/__init__.py.in |  2 +-
 modules/base/pymod/wrap_base.cc   | 14 +++++++++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/modules/base/pymod/__init__.py.in b/modules/base/pymod/__init__.py.in
index 63cd09716..89316b831 100644
--- a/modules/base/pymod/__init__.py.in
+++ b/modules/base/pymod/__init__.py.in
@@ -18,7 +18,7 @@
 #------------------------------------------------------------------------------
 
 
-__all__=['CharList','Correl', 'FileLogSink', 'FloatList', 'FloatMatrix', 'GetCurrentLogSink', 'GetPrefixPath', 'GetSharedDataPath', 'GetVerbosityLevel', 'Histogram', 'IntList', 'LogDebug', 'LogError', 'LogInfo', 'LogScript', 'LogSink', 'LogTrace', 'LogVerbose', 'LogWarning', 'Max', 'Mean', 'Median', 'Min', 'MultiLogSink', 'PopLogSink', 'PopVerbosityLevel', 'PushLogSink', 'PushVerbosityLevel', 'Range', 'SetPrefixPath', 'StdDev', 'StreamLogSink', 'StringList', 'StringLogSink', 'Units', 'VERSION', 'VERSION_MAJOR', 'VERSION_MINOR', 'VERSION_PATCH', 'WITH_NUMPY', 'conop', 'geom', 'io', 'mol', 'seq', 'stutil' @ALL_ADDITIONAL_MODULES@]
+__all__=['CharList','Correl', 'FileLogSink', 'FloatList', 'FloatMatrix', 'FloatMatrix3', 'FloatMatrix4', 'GetCurrentLogSink', 'GetPrefixPath', 'GetSharedDataPath', 'GetVerbosityLevel', 'Histogram', 'IntList', 'LogDebug', 'LogError', 'LogInfo', 'LogScript', 'LogSink', 'LogTrace', 'LogVerbose', 'LogWarning', 'Max', 'Mean', 'Median', 'Min', 'MultiLogSink', 'PopLogSink', 'PopVerbosityLevel', 'PushLogSink', 'PushVerbosityLevel', 'Range', 'SetPrefixPath', 'StdDev', 'StreamLogSink', 'StringList', 'StringLogSink', 'Units', 'VERSION', 'VERSION_MAJOR', 'VERSION_MINOR', 'VERSION_PATCH', 'WITH_NUMPY', 'conop', 'geom', 'io', 'mol', 'seq', 'stutil' @ALL_ADDITIONAL_MODULES@]
 
 from _ost_base import *
 from stutil import *
diff --git a/modules/base/pymod/wrap_base.cc b/modules/base/pymod/wrap_base.cc
index f142790dc..b0cfa8465 100644
--- a/modules/base/pymod/wrap_base.cc
+++ b/modules/base/pymod/wrap_base.cc
@@ -114,9 +114,21 @@ BOOST_PYTHON_MODULE(_ost_base)
     .def(vector_indexing_suite<std::vector<int> >())
     .def(geom::VectorAdditions<IntList>())
   ;
-  
+
   typedef std::vector< FloatList > FloatMatrix;
   class_<FloatMatrix>("FloatMatrix", init<>())
   .def(vector_indexing_suite<FloatMatrix>())
   ;
+
+  typedef std::vector< FloatMatrix > FloatMatrix3;
+  class_<FloatMatrix3>("FloatMatrix3", init<>())
+  .def(vector_indexing_suite<FloatMatrix3>())
+  ;
+
+  typedef std::vector< FloatMatrix3 > FloatMatrix4;
+  class_<FloatMatrix4>("FloatMatrix4", init<>())
+  .def(vector_indexing_suite<FloatMatrix4>())
+  ;
+
+  ;
 }
-- 
GitLab