Comments (16)
Yes, it's basically a hierarchical vector with a few things:
- The
.y
nodes are outside of the hierarchy at each level and are used to store things like cell-specific morphogen gradients (current PDE solutions). - Broadcasted operations are quite efficient through recursion: https://github.com/JuliaDiffEq/MultiScaleArrays.jl/blob/master/src/math.jl#L19-L42
- Resizing is straightforward and cheap https://github.com/JuliaDiffEq/MultiScaleArrays.jl/blob/master/src/diffeq.jl
- The nodes at the bottom can all be different sizes (for different cell types)
- You can add new fields to the nodes to be able to signify cell types and track cell lineages.
It's basically for building beefed up simulations of http://docs.juliadiffeq.org/latest/features/callback_functions.html#Example-3:-Growing-Cell-Population-1 where you have entire gene regulatory networks, different cell types, and morphogen gradients across space. I built it for modeling single cell RNA-seq data, so it needs to satisfy those 5 points. I'd be surprised if anything else really hits this dead on because it's a very specific list of requirements for a specific modeling application.
from multiscalearrays.jl.
It would be fun to try it with an n-body simulation (which I think is an application of fast multipole? And HierarchicalMatrix solvers == Fast multipole)
Let's take that over to DiffEqPhysics. There might be a GSoC for n-body problems so this would be great to handle.
from multiscalearrays.jl.
Does it work inside the ODE and SDE solvers, and does have easy resizing?
from multiscalearrays.jl.
What do you mean by easy resizing?
from multiscalearrays.jl.
tissue3 = construct(Tissue, deepcopy([population, population2]))
add_node!(embryo, tissue3) # Adds a new tissue to the embryo
remove_node!(embryo, 2, 1) # Removes population 1 from tissue 2 of the embryo
The main purpose of this package is to be able to add and remove portions of the array with minimal cost.
from multiscalearrays.jl.
On the matrix level what does add_node!
do? Adds additional rows/columns?
from multiscalearrays.jl.
This is an abstract vector. If it was a matrix it would be a ragged array in general, but it would be like adding rows and columns
from multiscalearrays.jl.
HierarchicalMatrices.jl is meant to create matrices with heterogeneous leaf types (cell types in MultiScaleArrays.jl). Also, in HierarchicalMatrices.jl, the nodes can support further hierarchical nodes and leaves themselves. The main application (so far) is a fast BLAS-overridden A_mul_B!
in the 0.6 syntax, but fast linear solves should be no problem either.
It can modify the block types on-the-fly (provided the new type was included in the parse-time list), but it can't modify the number of blocks on-the-fly as it stores a concrete matrix of each type as a placeholder.
from multiscalearrays.jl.
Ahhh.... so it's more of a HierarchicalVector
?
from multiscalearrays.jl.
I mean, it could "remove" a block by replacing it with a type of zero array (or just change the referenced type of block number in the hash table assigned
.)
from multiscalearrays.jl.
Does it work inside the ODE and SDE solvers
It would be fun to try it with an n-body simulation (which I think is an application of fast multipole? And HierarchicalMatrix solvers == Fast multipole)
from multiscalearrays.jl.
Yes, that would be fantastic. The example shows usage for a couple different potentials.
from multiscalearrays.jl.
so explicit methods work immediately
from multiscalearrays.jl.
Does this package overlap with HierarchicalMatrices.jl?
it can't modify the number of blocks on-the-fly
So it sounds like the answer is "yes it overlaps, but not 100%".
So the question is whether there is enough overlap to try to make a common interface.
BlockArrays.jl is another overlapping package. I'd suggest at the very least both HierarchicalMatrices.jl and MultiScaleArrays.jl support Block
from BlockArrays.jl, so that you can dig into the hierarchy via (MultiScaleArrays.jl) A[Block(1)][Block(3)][Block(2)]
and (HierarchicalMatrices.jl) A[Block(1,1)][Block(2,3)][Block(3,4)]
.
from multiscalearrays.jl.
P.S. How many levels deep do you usually go? I've found that indexing usually slows down past about 10-12 levels, curious what you find.
from multiscalearrays.jl.
Usually just 3.
from multiscalearrays.jl.
Related Issues (20)
- Efficient broadcast iteration
- Package causing "unsatisfiable package requirements" error HOT 1
- Pictures HOT 1
- Solving a MultiScaleArrays which leafs contain additional information (e.g. celltype::Symbol) HOT 5
- Stiff solvers cannot resize
- ERROR: UndefVarError: dims not defined using custom fields HOT 3
- Fast path for broadcasting with an array HOT 1
- Addat deleteat on a vector HOT 1
- All resize testing is disabled and broken
- MethodError: no method matching recursivecopy!(::Float64, ::Float64) HOT 15
- Package compatibility caps
- Indexing Issues with MultiScaleArrays.jl on v0.7 HOT 3
- Register HOT 29
- add_node! not outputting expected result with integrator input HOT 1
- TagBot trigger issue HOT 6
- no stable docs
- Segfault on 1.10 due to invalid getrs! inputs
- Improve docstrings
- MultiScaleModels Profiling HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from multiscalearrays.jl.