@@ -24,24 +24,24 @@ Each type above then contains three fields:
24
24
25
25
Note that the ordering of the fields matters.
26
26
`B` is the `BottomType`, which has to be the same as the eltype for the array
27
- in the leaf types. `T` is another `AbstractMultiScaleArray`. Thus at each level,
28
- an` AbstractMultiScaleArray` contains some information of its own (`values`), the
27
+ in the leaf types. `T` is another `AbstractMultiScaleArray`. Thus, at each level,
28
+ an ` AbstractMultiScaleArray` contains some information of its own (`values`), the
29
29
next level down in the hierarchy (`nodes`), and caching for indices (`end_idxs`).
30
- You can add and use extra fields as you please, and even make the types immutable.
30
+ You can add and use extra fields as you please, and you can even make the types immutable.
31
31
32
32
## The MultiScaleModel API
33
33
34
34
The resulting type acts as an array. A leaf type `l` acts exactly as an array
35
35
with `l[i] == l.values[i]`. Higher nodes also act as a linear array. If `ln` is level
36
36
`n` in the hierarchy, then `ln.nodes` is the vector of level `n-1` objects, and `ln.values`
37
- are its " intrinsic values" . There is an indexing scheme on `ln`, where:
37
+ are its “ intrinsic values” . There is an indexing scheme on `ln`, where:
38
38
39
39
- `ln[i,j,k]` gets the `k`th `n-3` object in the `j`th `n-2` object in the `i`th level `n-1`
40
40
object. Of course, this recurses for the whole hierarchy.
41
41
- `ln[i]` provides a linear index through all `.nodes` and `.values` values in every lower
42
42
level and `ln.values` itself.
43
43
44
- Thus `typeof(ln) <: AbstractVector{B}` where `B` is the eltype of its leaves and
44
+ Thus, `typeof(ln) <: AbstractVector{B}`, where `B` is the eltype of its leaves and
45
45
all `.values`'s.
46
46
47
47
In addition, iterators are provided to make it easy to iterate through levels.
@@ -59,7 +59,7 @@ mimics a vector in order for usage in DifferentialEquations or Optim. So for exa
59
59
embryo[12]
60
60
```
61
61
62
- returns the " 12th protein" , counting by Embryo > Tissue > Population > Cell in order
62
+ returns the “ 12th protein” , counting by Embryo > Tissue > Population > Cell in order
63
63
of the vectors. The linear indexing exists for every `AbstractMultiScaleArray`.
64
64
These types act as full linear vectors, so standard operations do the sensical
65
65
operations:
@@ -82,7 +82,7 @@ for cell in level_iter(embryo, 3)
82
82
end
83
83
```
84
84
85
- or the multiple level iter, which is the one generally used in
85
+ or the multiple- level iter, which is the one generally used in
86
86
DifferentialEquations.jl functions:
87
87
88
88
```julia
101
101
```
102
102
103
103
However, the interesting behavior comes from event handling. Since `embryo` will be the
104
- " vector" for the differential equation or optimization problem, it will be the value
104
+ “ vector” for the differential equation or optimization problem, it will be the value
105
105
passed to the event handling. MultiScaleArrays includes behavior for changing the
106
106
structure. For example:
107
107
0 commit comments