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

use more c++ style put api #4483

Closed
wants to merge 1 commit into from

Conversation

karlnapf
Copy link
Member

No description provided.

@karlnapf
Copy link
Member Author

karlnapf commented Jan 24, 2019

Distance d = distance("EuclideanDistance", lhs=features_train, rhs=features_train)

becomes (in cpp)

auto d = wrap(distance("EuclideanDistance"));
d->put(Tag<decltype(features_train)>("lhs"), features_train);
d->put(Tag<decltype(features_train)>("rhs"), features_train);

@karlnapf
Copy link
Member Author

@sorig it would be cool if I could do the same thing for the "MethodCall" secion in cpp.json. But currently all arguments are jointly hidden in $arguments so I cannot extract the name/value pair that a put call would get.

@karlnapf
Copy link
Member Author

karlnapf commented Jan 24, 2019

@sorig in addition @lisitsyn would like to move all Tag occurrences to the beginning of the script 😱

lisitsyn 11:50:39
HeikoS: I believe the next step is to move all the Tag<…> to the top of the script
@HeikoS 11:50:57
That will be tricky
although
maybe not
lisitsyn 11:51:12
HeikoS: some postprocessing
HeikoS: perfect would be to declare a namespace in the beginning
namespace tags { … }
and then put them there

@karlnapf
Copy link
Member Author

@lisitsyn actually I realise this does not make any sense as the normal put call is already templated and the template that matches the argument is used .... :/

@karlnapf karlnapf closed this Jan 26, 2019
@karlnapf
Copy link
Member Author

What we need is something for the construction of objects, in c++ we want to use constructors while in swig we want to use factories .... but later ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant