What is IncidenceMatrix good for?

Questions and problems about using polymake go here.
tropical

What is IncidenceMatrix good for?

Postby tropical » 13 Jun 2016, 13:23

Can someone describe to me what IncidenceMatrix is good for and how to use it?

Thanks in advance.

User avatar
hampe
Developer
Posts: 48
Joined: 29 Apr 2011, 10:42

Re: What is IncidenceMatrix good for?

Postby hampe » 13 Jun 2016, 17:33

A short answer is that an IncidenceMatrix encodes a list of subsets of some set {0,...,n}. So it is (in terms of the information it contains) almost the same as an Array<Set<Int> >, except that it contains the additional information of what the full set is (this is the number of columns of the IncidenceMatrix). The advantage over an Array is for example that it supports matrix-like operations, such as transposition.

You can find the documentation of the C++ data type at http://www.polymake.org/release_docs/ma ... atrix.html

The page on scripting contains information about basic usage of data types on the perl side of polymake. As it says in the section about associative containers: "Class IncidenceMatrix behaves like a two-dimensional sparse matrix. It supports the same access patterns as if it were a SparseMatrix<Bool>, while its rows and columns have the Set-like interface."

For more usage examples, I'd also recommend looking at the polymake code. IncidenceMatrix is ubiquitous in almost all polymake objects. See also this forum post for a small example.


Return to “Helpdesk”