Page 1 of 1

ERROR: no matching overloaded instance of...

Posted: 03 Jun 2018, 23:19
by MattLarson
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!

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

Posted: 04 Jun 2018, 00:28
by gawrilow
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);

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

Posted: 04 Jun 2018, 14:03
by joswig
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."

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

Posted: 04 Jun 2018, 18:01
by MattLarson
Thank you both so much for your help!