Search found 15 matches

Go to advanced search

by jrei
17 May 2019, 11:10
Forum: Helpdesk
Topic: Segmentation Fault when using Edgemap
Replies: 9
Views: 461

Re: Segmentation Fault when using Edgemap

This is the file containing the graph right before it is returned by the C++ function.
by jrei
17 May 2019, 09:15
Forum: Helpdesk
Topic: Segmentation Fault when using Edgemap
Replies: 9
Views: 461

Re: Segmentation Fault when using Edgemap

Sadly the mistake still occurs when i call

Code: Select all

$network->get_attachment("tree1")->edge(0,1);
immediately after calling the c++ function that returns $network. For my other calls the object still exists as well.
by jrei
16 May 2019, 19:08
Forum: Helpdesk
Topic: Segmentation Fault when using Edgemap
Replies: 9
Views: 461

Re: Segmentation Fault when using Edgemap

I'm able to save the Graph in a file. In said file i also find the segment:

Code: Select all

<attachment name="tree1" type="EdgeMap&lt;Directed, Bool&gt;" construct="ADJACENCY"> <v>false true true true false false true</v> </attachment>
This looks fine to me.
by jrei
15 May 2019, 17:58
Forum: Helpdesk
Topic: Segmentation Fault when using Edgemap
Replies: 9
Views: 461

Re: Segmentation Fault when using Edgemap

I get it as an attachment from a Graph object. Maybe there is a problem with how i call get_attachment, since it is somehow attached to the adjacency? Currently i do: my $em = $network->get_attachment("tree1"); Here $network is returned from a c++ function. The EdgeMap is attached to $network using ...
by jrei
14 May 2019, 15:00
Forum: Helpdesk
Topic: Segmentation Fault when using Edgemap
Replies: 9
Views: 461

Segmentation Fault when using Edgemap

Hello Everyone,

I'm currently using an EdgeMap. When I try to get a value from it, like with

Code: Select all

$em->edge(0,1)
I only get a Segmentation fault.
The full type of the EdgeMap according to "ref($em)" is

Code: Select all

Polymake::common::EdgeMap_A_Directed_I_Bool_Z
What might result in this fault?

JR
by jrei
30 Apr 2019, 09:08
Forum: Helpdesk
Topic: serializing a SparseMatrix in c++
Replies: 7
Views: 296

Re: serializing a SparseMatrix in c++

How do i pass the property path to attach?
I tried

Code: Select all

object.attach("name")<<graph<<edgeMap
and

Code: Select all

object.attach("name")<<"ADJACENCY"<<edgeMap
where graph holds the ADJACENCY of the object. But it seems that both are wrong.

Thank you
by jrei
28 Apr 2019, 13:05
Forum: Helpdesk
Topic: serializing a SparseMatrix in c++
Replies: 7
Views: 296

Re: serializing a SparseMatrix in c++

What you can do is to store it as an attachment of the big object, passing the property path descending to the corresponding ADJACENCY property as an additional argument to attach(). I'd like to do that. However, when using it as described here I get an error during compilation because no such func...
by jrei
26 Apr 2019, 10:37
Forum: Helpdesk
Topic: serializing a SparseMatrix in c++
Replies: 7
Views: 296

Re: serializing a SparseMatrix in c++

Thank you for your answer, save_data() does the job for matrices. However it seems not to work for other data objects, like EdgeMaps. The saved EdgeMap has its data type written in the .xml file. However it doesn't contain any information on the graph it's based on. I assume that is why load_data() ...
by jrei
22 Apr 2019, 14:02
Forum: Helpdesk
Topic: serializing a SparseMatrix in c++
Replies: 7
Views: 296

serializing a SparseMatrix in c++

Hello, I want to serialize a SparseMatrix. I noticed, that it's possible to output a SparseMatrix as cout<<"SparseMatrix: "<< someSparseMatrix . The same is not possible for other streams: std::ofstream outputFile outputFile<<"SparseMatrix: "<< someSparseMatrix This fails. However i didn't find the ...
by jrei
20 Apr 2019, 12:20
Forum: Helpdesk
Topic: Return values of c++ functions connected to perl
Replies: 1
Views: 145

Return values of c++ functions connected to perl

Hello Everyone, I wrote a c++ function that i want to connect to perl by using Function4perl. In its current implementation the function returns a vector of a structure "region". When executing the function in polymake i get ERROR: no output operators known for std::vector<graph::region, std::alloca...

Go to advanced search

cron