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

C API #78

Closed
FlorianUekermann opened this issue Feb 4, 2019 · 3 comments
Closed

C API #78

FlorianUekermann opened this issue Feb 4, 2019 · 3 comments

Comments

@FlorianUekermann
Copy link
Contributor

Both tsne.h and tsne_main.cpp seem to be almost entirely C code. Would you be opposed to a pull request making them C compatible? This would make your code usable as both C and C++ library, allowing for easy implementation of language bindings without intermediate files.

I am interested in this for the C library bindings and for contributing Go bindings.

@lvdmaaten
Copy link
Owner

Yeah, definitely! The current way of data serialization via files is obviously incredibly clunky.

This shouldn't require many code changes: adding a single C function that calls TSNE::run and is wrapped in an extern "C" block should suffice?

@FlorianUekermann
Copy link
Contributor Author

Yes, pretty much. I thought since its pretty much entirely C anyway, the cleanest option would be just turn the two mentioned files plain C. The class seems to be abused as namespace. Anyway, I'll send a PR, then you can have a look.

@FlorianUekermann
Copy link
Contributor Author

Thanks for merging.

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

No branches or pull requests

2 participants