AlgebraicJulia / CombinatorialSpaces.jl

Simplicial sets and other combinatorial models of geometric spaces
MIT License
27 stars 4 forks source link

Improving `show` of Meshes #103

Open lukem12345 opened 3 weeks ago

lukem12345 commented 3 weeks ago

Currently, we display meshes in the REPL by relying on the usual method one-size-fits-all default for pretty-printing the tabular representation of an ACSets. This is convenient for e.g. examining whether orientations are set to nothing.

However, especially for large meshes, this default means can be quite slow and noisy, leading to a poor UX. Further, most of the quality-checks we care about are hard to perform by manual inspection of the tabular representation. Dual complexes especially suffer from these problems, since they are always larger and always contain more tables.

So, we should investigate ways of speeding up such visualizations.

Here are some potential ideas:

nparts and/ or statistics

For any mesh, or meshes above a certain size, only display the number of simplices of each dimension. Further, we could always return the Euler characteristic, and so on, as we do when testing our mesh loading.

Some Advantages:

Some Disadvantages:

Sparse matrix visualizations

One interesting idea is to display connectivity information as given by the sparse matrix visualization of the $d_0$ matrix, or all $d$ matrices, or the $\Delta_0$ matrix.

Some Advantages:

Some Disadvantages:

Some of those disadvantages are ameliorated by providing an easy means to still pretty-print the underlying ACSet.

Upstreaming

Or, we could look at speeding up display for all ACSets upstream. This would solve the speed issue, but would not the noise.

lukem12345 commented 3 weeks ago

@jpfairbanks I am interested to hear your thoughts on this issue.

jpfairbanks commented 3 weeks ago

I think that printing summary statistic if the mesh is above a certain size is fine. You could for instance print the size of each table.

Some information about the geometric layout of the points would be helpful so you could also print a bounding box for embedded Delta sets