Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support tag-based vector/matrix parameters in SWIG (float64 by default) #4072

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/interfaces/swig/SGBase.i
Expand Up @@ -513,6 +513,8 @@ copy_reg._reconstructor=_sg_reconstructor
%include <shogun/lib/basetag.h>
%include <shogun/lib/tag.h>
%include <shogun/base/SGObject.h>
%include <shogun/lib/SGVector.h>
%include <shogun/lib/SGMatrix.h>

%define SUPPORT_TAG(camel_type, short_type, type)
%template(Tag ## camel_type) shogun::Tag<type>;
Expand All @@ -528,3 +530,5 @@ SUPPORT_TAG(String, string, std::string)
SUPPORT_TAG(Float64, float, float64_t)
SUPPORT_TAG(Int64, int, int64_t)
SUPPORT_TAG(Object, object, CSGObject*)
SUPPORT_TAG(Vector, vector, SGVector<float64_t>)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have the ancient macros like USE_FLOAT64 etc. )

SUPPORT_TAG(Matrix, matrix, SGMatrix<float64_t>)