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

Initialization of vertex embedding for EmbeddedMap3 #3

Open
goldnd opened this issue Jan 29, 2016 · 1 comment
Open

Initialization of vertex embedding for EmbeddedMap3 #3

goldnd opened this issue Jan 29, 2016 · 1 comment

Comments

@goldnd
Copy link

goldnd commented Jan 29, 2016

The intialization of the vertex embedding for cutEdge in embeddedMap3 is commented out. Uncommenting fails so I copied and modified the edge embedding code:

if(isOrbitEmbedded<VERTEX>())
    {
        // embed the new darts created in the cut vertex
        Algo::Topo::setOrbitEmbedding<VERTEX>(*this, d, getEmbedding<VERTEX>(d)) ;
        // embed a new cell for the new vertex and copy the attributes' line (c) Lionel
        Algo::Topo::setOrbitEmbeddingOnNewCell<VERTEX>(*this, nd) ;
    }

I can submit a pull request but there are other changes that you may not want on my branch.

@sylvainthery
Copy link
Contributor

The right thing to do is:

if(isOrbitEmbedded<VERTEX>()) \n
      Algo::Topo::initOrbitEmbeddingOnNewCell<VERTEX>(*this, nd) ;

But in fact it is not really necessary, because of the lasy embedding approch we take.
When you access to a non-embedded cell for writing in an attribute the embedding is
done. The drawback is a crash if you try to read before the first write (but normally you
should not).

The modification has been pushed in current master

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