Skip to content

Change matrices and other fixes for python bindings#1162

Closed
teseoch wants to merge 40 commits intolibigl:devfrom
skoch9:dev
Closed

Change matrices and other fixes for python bindings#1162
teseoch wants to merge 40 commits intolibigl:devfrom
skoch9:dev

Conversation

@teseoch
Copy link
Copy Markdown
Collaborator

@teseoch teseoch commented Apr 18, 2019

[Describe your changes and what you've already done to test it.]

Check all that apply (change to [x])

  • All changes meet libigl style-guidelines.
  • Adds new .cpp file.
  • Adds corresponding unit test.
  • Adds corresponding python binding.
  • This is a minor change.

typename PType>
IGL_INLINE void igl::bfs(
const Eigen::SparseMatrix<AType> & A,
const AType & A,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure we can't use SparseCompressedBase?

typename PType>
IGL_INLINE void bfs(
const Eigen::SparseMatrix<AType> & A,
const AType & A,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

const int d,
const igl::ARAPEnergyType energy,
Eigen::SparseMatrix<Scalar> & Kd);
MatK & Kd);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these be either SparseMatrixBase or SparseCompressedBase?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I think we'll need to bump the version of Eigen for this.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesnt work. SparseCompressedBase does not support resize reserve etc

const Eigen::MatrixBase<DerivedF> & F,
const int dim,
const igl::ARAPEnergyType energy,
Eigen::SparseMatrixBase<DerivedK>& K)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When do we use SparseMatrixBase and when do we use SparseCompressedBase?

const int dim,
const igl::ARAPEnergyType energy,
Eigen::SparseMatrix<double>& K);
Eigen::SparseMatrixBase<DerivedK>& K);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When do we use SparseMatrixBase and when do we use SparseCompressedBase?

@@ -17,7 +17,7 @@ IGL_INLINE void igl::colon(
const H hi,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have to do this, but these should all be Eigen::Index

template <typename SparseT, typename DerivedC, typename Derivedcounts>
IGL_INLINE void igl::vertex_components(
const Eigen::SparseMatrix<AScalar> & A,
const SparseT & A,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SparseCompressedBase

template <typename SparseT, typename DerivedC>
IGL_INLINE void igl::vertex_components(
const Eigen::SparseMatrix<AScalar> & A,
const Eigen::SparseCompressedBase<SparseT> & A,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@teseoch teseoch requested a review from fwilliams April 26, 2019 14:01
Copy link
Copy Markdown
Collaborator

@jdumas jdumas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait so this commit is removing the old python bindings, but is not adding the new ones?

@fwilliams
Copy link
Copy Markdown
Collaborator

@jdumas yes. Right now we're working on the new python bindings in a separate repo which has libigl as a cmake external project. We're making changes to libigl and sending PRs (like this one) as we go along.

@teseoch ran into some tricky compilation issues with the old bindings. We realized it would be much less effort if we killed the old bindings in this repository while we make changes necessary for the new bindings (as opposed to fixing the old bindings to work with the new changes).

If others are using the python bindings in the dev branch, then we could move the old python bindings to a seperate repo with libigl as a CMake external project and point the external project version to the commit before this one.

@jdumas
Copy link
Copy Markdown
Collaborator

jdumas commented Apr 26, 2019

People are still using the dev branch with the old python bindings. The old python bindings are currently broken in master, and I think we should maintain a version of libigl with the old bindings until the new ones are ready for general use.

Why do the new python bindings use libigl as an external project? Wouldn't it be better to have them in the libigl main repo (we had this discussion before), as it would prevent them from using a deprecated version of libigl and make sure new PRs are not breaking existing python bindings.

@jdumas
Copy link
Copy Markdown
Collaborator

jdumas commented Apr 26, 2019

If anything, I would be more comfortable pushing the current dev branch into master before we merge this commit, and maybe create a release branch if we need to backport fixes until the new bindings are ready.

@fwilliams
Copy link
Copy Markdown
Collaborator

fwilliams commented Apr 26, 2019

We decided with @danielepanozzo and @teseoch to have the python bindings in a separate repository while we develop them. This let's us "move fast and break things" in the binding code as well as have a small group of people have direct push access for bindings. Necessary changes to libigl are sent as pull requests as we go along and if we merge things fast enough, then we can keep everything up to date.

In contrast if we were to directly develop against dev, every small change to the bindings will require a PR and a lot more overhead.

We can decide later if we want to move the bindings into the main repo or not (there are pros and cons both ways and I don't really have an opinion on this tbh), but at least for now the setup we have makes sense if we want to get things done.

Pushing the current dev into master sounds like a great idea if its ready. How quickly can we do this by? I would really like to land this pull request. We're going to have a lot more changes like this and the longer they hang, the more difficult it's going to be to merge everything.

@jdumas
Copy link
Copy Markdown
Collaborator

jdumas commented Apr 26, 2019

Well, this depends on @alecjacobson and @danielepanozzo more than me. But before merging dev into master, we should take a look at other existing -- smaller -- pull-requests, and see if they can be merged. Then we need to update the changelog on the website with the list of new features, as we merge into master and tag the new release.

I thought we had created the dev-python exactly for the purpose of developing the new python bindings into libigl, since it is not protected, and can be kept in sync with master/dev as needed. It would be weird to turn dev into an unstable branch were python bindings are nuked until new ones are created. At least I'm worried it might give the wrong impression if this drags on.

@teseoch
Copy link
Copy Markdown
Collaborator Author

teseoch commented May 3, 2019

something is wierd with appveyor, any idea?

@jdumas
Copy link
Copy Markdown
Collaborator

jdumas commented May 4, 2019

It probably means you need to resolve the conflicts against dev before AppVeyor can build again.

@teseoch teseoch closed this Jun 14, 2019
@teseoch teseoch reopened this Jun 14, 2019
@teseoch teseoch closed this Jun 14, 2019
@teseoch teseoch reopened this Jun 14, 2019
@teseoch teseoch mentioned this pull request Jun 14, 2019
@teseoch teseoch closed this Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants