Skip to main content

Python implementation of the Fast Linear Assigment Sorting Algorithm

Project description

Fast Linear Assignment Sorting - FLAS

main_pic

FLAS allows to sort 2d grids based on similarity. This directory contains the python implementation and shows how to use it.

Features

  • Implementation of FLAS and DPQ (and other metrics to quantify an arrangement)
  • Allows frozen fields
  • Allows empty fields (holes)
  • Deterministic random when seeded
  • Installable via PyPI
  • Easy to use python interface with numpy support
  • Fast implementation in C++

Installation

pip install vc_flas

Install from sources

git clone https://github.com/Visual-Computing/LAS_FLAS.git
cd LAS_FLAS/c_python
pip install .  # or
pip install -e .  # for develop/editable mode

Usage

Basic Usage

Given that you have N features with D-dimensions, you can sort these features based on similarity with the following code:

import numpy as np
from vc_flas import Grid, flas

N, D = 241, 3
features = np.random.random((N, D))
grid = Grid.from_features(features)

arrangement = flas(grid, wrap=True, radius_decay=0.99)

sorted_features = arrangement.get_sorted_features()
height, width, dim = sorted_features.shape
assert (height, width, dim) == (16, 16, 3)

# show_image(sorted_features)

Working with Arrangements and Labels

Often you need not only the features sorted, but other objects (like images for example) as well. See this example for more information on that.

Creating Grids

There are more ways to initialize grids. See here for some examples.

Metrics

TODO

About

Kai Barthel, Nico Hezel, Klaus Jung, Bruno Schilling and Konstantin Schall

HTW Berlin, Visual Computing Group, Germany

Visual Computing Group

This is an example implementation of the algorithms from the paper

Improved Evaluation and Generation of Grid Layouts using Distance Preservation Quality and Linear Assignment Sorting

Published in COMPUTER GRAPHICS Forum: (https://onlinelibrary.wiley.com/doi/full/10.1111/cgf.14718)

Reference

Reference to cite when you use any of the presented algorithms in a research paper:

@article{https://doi.org/10.1111/cgf.14718,
    author = {Barthel, K. U. and Hezel, N. and Jung, K. and Schall, K.},
    title = {Improved Evaluation and Generation Of Grid Layouts Using Distance Preservation Quality and Linear Assignment Sorting},
    journal = {Computer Graphics Forum},
    volume = {42},
    number = {1},
    pages = {261-276},
    keywords = {interaction, user studies, visualization, information visualization, high dimensional sorting, assistive interfaces},
    doi = {https://doi.org/10.1111/cgf.14718},
    url = {https://onlinelibrary.wiley.com/doi/abs/10.1111/cgf.14718},
    year = {2023}
}

How to publish a new version

  • Run git checkout main and git pull to be sure, all updates are fetched
  • Edit version number in c_python/src/vc_flas/__init__.py to x.y.z
  • Run git add -A, git commit -m 'vx.y.z' and git tag -a vx.y.z -m 'vx.y.z'
  • Run git push and git push origin --tags

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vc_flas-0.1.1.tar.gz (25.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

vc_flas-0.1.1-cp312-cp312-win_amd64.whl (93.1 kB view details)

Uploaded CPython 3.12Windows x86-64

vc_flas-0.1.1-cp312-cp312-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

vc_flas-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (114.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

vc_flas-0.1.1-cp312-cp312-macosx_11_0_x86_64.whl (88.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

vc_flas-0.1.1-cp312-cp312-macosx_11_0_arm64.whl (80.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

vc_flas-0.1.1-cp311-cp311-win_amd64.whl (93.0 kB view details)

Uploaded CPython 3.11Windows x86-64

vc_flas-0.1.1-cp311-cp311-musllinux_1_2_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

vc_flas-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (115.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

vc_flas-0.1.1-cp311-cp311-macosx_11_0_x86_64.whl (89.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

vc_flas-0.1.1-cp311-cp311-macosx_11_0_arm64.whl (81.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file vc_flas-0.1.1.tar.gz.

File metadata

  • Download URL: vc_flas-0.1.1.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for vc_flas-0.1.1.tar.gz
Algorithm Hash digest
SHA256 48f79d2a64c5d291cc6483b4971e2664fc76503cd77a13398da0e2d919256bd0
MD5 d0cbe85cd6b31e16dda683b1e78d6566
BLAKE2b-256 e7598d4cb4fd8aa8a248c2b392fbc81ac9befacf080034b83f8df4db1c00bcdb

See more details on using hashes here.

Provenance

The following attestation bundles were made for vc_flas-0.1.1.tar.gz:

Publisher: BuildAndPublish.yml on Visual-Computing/LAS_FLAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vc_flas-0.1.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: vc_flas-0.1.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 93.1 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for vc_flas-0.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7e4ccc8449b36ca08c1d6e64d21ee636da53008fb656564e5e8679cb3fe7b425
MD5 e08c7407b67d1432a4017b0b31e193b9
BLAKE2b-256 c86595e792dc3973db933a42bae158931e3a329c22008c3365ea3cd2b780366e

See more details on using hashes here.

Provenance

The following attestation bundles were made for vc_flas-0.1.1-cp312-cp312-win_amd64.whl:

Publisher: BuildAndPublish.yml on Visual-Computing/LAS_FLAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vc_flas-0.1.1-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for vc_flas-0.1.1-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ecd898670cad1c4cb03a6e44dbaa2dbb1520efc5a969d92152adb57999679a88
MD5 54a3bc6ffe979a1fbff3e3cd111f605c
BLAKE2b-256 a43d6c18fdddd02028469e11b6381d5d7cf2206be37d09da1a5319082c978328

See more details on using hashes here.

Provenance

The following attestation bundles were made for vc_flas-0.1.1-cp312-cp312-musllinux_1_2_x86_64.whl:

Publisher: BuildAndPublish.yml on Visual-Computing/LAS_FLAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vc_flas-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vc_flas-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4edb0e62e74da479e5bfcf39962547c9f203ec8888581a8735e70a7b4a99136f
MD5 63762bf45850c99f377be4d5e409aa65
BLAKE2b-256 54ae65b2b1e86face5eea6720fb8a34bd2ca45bb7bacfbdaaf6e04881fd0c695

See more details on using hashes here.

Provenance

The following attestation bundles were made for vc_flas-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: BuildAndPublish.yml on Visual-Computing/LAS_FLAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vc_flas-0.1.1-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for vc_flas-0.1.1-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d13ce5407dd7aff1d6783af4248e97c3b21444ee103385c3f11a82d0c8273be5
MD5 4b45927df2cf42872ee57c29b6098b55
BLAKE2b-256 a6a10675836c5b0df0f8321a39a4a556a4b577c82e596ae383edb7761c8e3d5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for vc_flas-0.1.1-cp312-cp312-macosx_11_0_x86_64.whl:

Publisher: BuildAndPublish.yml on Visual-Computing/LAS_FLAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vc_flas-0.1.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vc_flas-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ed74f3fe5583290a65e8c4dc156bb4aab6b9ce88621b304af011bcdfaf39743e
MD5 21105e1ff08b812433872af06a91ff65
BLAKE2b-256 1bf6f23163bed3443645c23fc35022de13d5b9bf1b2ebef7e78e01f605ddad36

See more details on using hashes here.

Provenance

The following attestation bundles were made for vc_flas-0.1.1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: BuildAndPublish.yml on Visual-Computing/LAS_FLAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vc_flas-0.1.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: vc_flas-0.1.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 93.0 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for vc_flas-0.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ea01901e0efed92672ed6355d859e0a5b7f8528abf4603f457dde0290f701599
MD5 4265b191f4de48d04fc9b612299da24f
BLAKE2b-256 4d05c3cd6f0cdccd5d958e0741b467ac04da8c1ac3bff888006c99e1784e3ab1

See more details on using hashes here.

Provenance

The following attestation bundles were made for vc_flas-0.1.1-cp311-cp311-win_amd64.whl:

Publisher: BuildAndPublish.yml on Visual-Computing/LAS_FLAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vc_flas-0.1.1-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for vc_flas-0.1.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d0e435c76b9220c579732e5c46fcf4c81c421213179d682941b742c90cab4dc3
MD5 f3e0ba7af5f1caa493efdc3c64ec7a20
BLAKE2b-256 a71ccc5cc8df6c29a5027cf461f6c50ca9a5f7f952f82a9274c7228b012884e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for vc_flas-0.1.1-cp311-cp311-musllinux_1_2_x86_64.whl:

Publisher: BuildAndPublish.yml on Visual-Computing/LAS_FLAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vc_flas-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for vc_flas-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2ec0a2db6d127540cd18552d91a7f1ce8ce4fabf7d0312c0fe83d692f73a7786
MD5 389647d0488255c4aae77bc93e3d584c
BLAKE2b-256 6e35f44d6509328a106913f9ced1adcf1018582cafbf807854fa21136cd69fe3

See more details on using hashes here.

Provenance

The following attestation bundles were made for vc_flas-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: BuildAndPublish.yml on Visual-Computing/LAS_FLAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vc_flas-0.1.1-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for vc_flas-0.1.1-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 c501194fca3346f93dbdb345b4b880bef942bd0ab7cfc57f947c7553c2c9d19f
MD5 9a92ccfc94b1dd0466239d3eef8099c7
BLAKE2b-256 d73a89da8cd6e0a35e22583ad5288c5e67c3a45f573ec7ce16ae14709a4caea4

See more details on using hashes here.

Provenance

The following attestation bundles were made for vc_flas-0.1.1-cp311-cp311-macosx_11_0_x86_64.whl:

Publisher: BuildAndPublish.yml on Visual-Computing/LAS_FLAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vc_flas-0.1.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vc_flas-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 60b17b9dce3f9288d620fc2b9b8dbf4ee11d3911140bf1fe04b00c4ee4ee2756
MD5 97d9e9a65f6c6d06e30be05a7a2b959e
BLAKE2b-256 5be4fd6dcbed4381ee8af89faa0720606ba27840fb8c6184abab34b1d6288173

See more details on using hashes here.

Provenance

The following attestation bundles were made for vc_flas-0.1.1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: BuildAndPublish.yml on Visual-Computing/LAS_FLAS

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page