ERROR: no matching overloaded instance of...

Questions and problems about using polymake go here.
MattLarson
Posts: 14
Joined: 03 Jun 2018, 22:57

ERROR: no matching overloaded instance of...

Postby MattLarson » 03 Jun 2018, 23:19

Hi,

I'm getting errors of the form ERROR: no matching overloaded instance of... a lot, and I'm not sure how to interpret them. For example, when I run

Code: Select all

$g = graph_from_edges([[0,1],[0,2],[1,2],[2,3]]); $c = topaz::clique_complex($g,no_labels=>1); topaz::homology($c, 0);
I get the error "ERROR: no matching overloaded instance of Polymake::topaz::homology(SimplicialComplex, Int)"

(I took this construction of a simplicial complex from the documentation. The simplicial complex that I'm dealing with has a different construction, but gives the same error).

This isn't important in this specific case, since I can get the homology using $c->HOMOLOGY;, but what causes this sort of error?
Thank you very much for your help!

User avatar
gawrilow
Main Author
Posts: 423
Joined: 25 Dec 2010, 17:40

Re: ERROR: no matching overloaded instance of...

Postby gawrilow » 04 Jun 2018, 00:28

The function homology expects the list of facets as the first argument, not the entire `big' object. You can verify this by looking at the list of argument types produced by

Code: Select all

help "topaz::homology";
The name of the first argument is "complex" which might be in fact misleading.

In your example you should enter

Code: Select all

topaz::homology($c->FACETS, 0);

User avatar
joswig
Main Author
Posts: 280
Joined: 24 Dec 2010, 11:10

Re: ERROR: no matching overloaded instance of...

Postby joswig » 04 Jun 2018, 14:03

I'm getting errors of the form ERROR: no matching overloaded instance of... a lot, and I'm not sure how to interpret them.
To give a bit more context: polymake supports operator overloading and polymorphism. That is, the function to be called is not only determined by the name of the function but also by the types of its arguments.

That error just says: "I did not find a combination of function name and types which would match."

MattLarson
Posts: 14
Joined: 03 Jun 2018, 22:57

Re: ERROR: no matching overloaded instance of...

Postby MattLarson » 04 Jun 2018, 18:01

Thank you both so much for your help!


Return to “Helpdesk”