Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/julialinearalgebra/hierarchicalmatrices.jl
Julia package for hierarchical matrices
https://github.com/julialinearalgebra/hierarchicalmatrices.jl
cauchy fast-multipole-method hierarchical-matrices julia
Last synced: 20 days ago
JSON representation
Julia package for hierarchical matrices
- Host: GitHub
- URL: https://github.com/julialinearalgebra/hierarchicalmatrices.jl
- Owner: JuliaLinearAlgebra
- License: other
- Created: 2017-01-16T23:04:55.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-03-14T06:30:16.000Z (over 1 year ago)
- Last Synced: 2024-10-03T05:06:01.432Z (about 1 month ago)
- Topics: cauchy, fast-multipole-method, hierarchical-matrices, julia
- Language: Julia
- Size: 62.5 KB
- Stars: 26
- Watchers: 3
- Forks: 5
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# HierarchicalMatrices.jl
[![Build Status](https://travis-ci.org/JuliaMatrices/HierarchicalMatrices.jl.svg?branch=master)](https://travis-ci.org/JuliaMatrices/HierarchicalMatrices.jl) [![AppVeyor](https://ci.appveyor.com/api/projects/status/1t01s8cuoxrriem4/branch/master?svg=true)](https://ci.appveyor.com/project/MikaelSlevinsky/hierarchicalmatrices-jl-xfd1e/branch/master)
This package provides a flexible framework for hierarchical data types in Julia.
Create your own hierarchical matrix as simply as:
```julia
julia> using HierarchicalMatricesjulia> @hierarchical MyHierarchicalMatrix LowRankMatrix Matrix
```
The invocation of the `@hierarchical` macro creates an abstract supertype
`AbstractMyHierarchicalMatrix{T} <: AbstractMatrix{T}` and the immutable type
`MyHierarchicalMatrix`, endowing it with fields of `HierarchicalMatrixblocks`,
`LowRankMatrixblocks`, `Matrixblocks`, and a matrix of integers, `assigned`, to
determine which type of block is active. The package comes pre-loaded with a
`HierarchicalMatrix`.See the example on speeding up the matrix-vector product with Cauchy matrices.
# Implementation
A straightforward implementation of hierarchical (self-referential) data types
might suffer from Russell's paradox. In the context of types, Russell's paradox
states that either you know the type, or you know its fields, but neither
concretely. On one side of the paradox, you end up with type-stable constructors
and type-unstable getters; on the other side, you are stuck with type-unstable
constructors and type-stable getters.This implementation of hierarchical data types avoids Russell's paradox at the
cost of restricting the entire list of concrete matrix types that are the fields
upon construction. This allows for fast and type-stable setters and getters.
Enjoy!