Skip to content

add interface for MotifCluster #80

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ntfrgl
Copy link

@ntfrgl ntfrgl commented Dec 10, 2016

  • check if ARPACK installed (so far only on Linux, OSX)
  • compile motifcluster.cpp, include motifcluster.h in snap.i
  • missing: typedef WeightVH

To make this fully functional, two things are missing, and I would like to ask for your help:

  1. Add WeightVH: see below
  2. check for ARPACK on Windows: I don't have a Windows machine to test on.

I tried adding WeightVH in the following way:

swig/snap.i

%template(WeightVH) TVec<TIntH>;
%ignore TVec< THash<TInt, TInt, TDefaultHashFunc<TInt> > >::GetPrimHashCd;
%ignore TVec< THash<TInt, TInt, TDefaultHashFunc<TInt> > >::GetSecHashCd;

swig/tvec.i

WeightVH.__getitem__ = getitem_vec
WeightVH.__setitem__ = setitem_vec
WeightVH.__iter__ = itervec
WeightVH.__len__ = len_vec
WeightVH.__delitem__ = delitem_vec

But both with and without the %ignores, this lead to the compilation error:

swig/snap_wrap.cxx

error: no member 'GetPrimHashCd' in 'THash<TInt, TInt, TDefaultHashFunc<TInt> >'
error: no member 'GetSecHashCd' in 'THash<TInt, TInt, TDefaultHashFunc<TInt> >'

Is it necessary to add functions to the C++ library?

ntfrgl and others added 2 commits December 10, 2016 16:07
    - check if ARPACK installed (so far only on Linux, OSX)
    - compile motifcluster.cpp, include motifcluster.h in snap.i
    - missing: typedef WeightVH
@ntfrgl ntfrgl changed the title add interface for MotifCluster (incomplete) add interface for MotifCluster Jan 13, 2017
@ntfrgl
Copy link
Author

ntfrgl commented Jan 13, 2017

Works now!
The %ignore just needed the format from the %template declaration to fire.

swig/snap.i

%ignore TVec<TIntH>::GetPrimHashCd;
%ignore TVec<TIntH>::GetSecHashCd;

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.

1 participant