Creating you own BoxMap type
Subtypes of the abstract type BoxMap
must have four restrictions:
- There must be a
domain
field within the type, i.e.struct MyBoxMap{N,T} domain::Box{N,T} # other things ... end
- There must be a method
map_boxes(g::MyBoxMap, source::BoxSet)
which computes the setwise image ofsource
underg
and returns aBoxSet
. - There must be a method
construct_transfers(g::BoxMap, domain::BoxSet, codomain::BoxSet)
which computes a dictionary-of-keys sparse matrixmat
withmat[(hit_key, source_key)] = weight
for the TransferOperator, wherehit_key ∈ codomain.set
andsource_key ∈ domain.set
. - There must be a method
construct_transfers(g::MyBoxMap, source::BoxSet)
which computes a dictionary-of-keys sparse matrixmat
withmat[(hit_key, source_key)] = weight
for the TransferOperator, as well as aBoxSet
calledimage
which is the setwise image ofsource
(i.e. the return value ofmap_boxes
). These are both returned byconstruct_transfers(g::MyBoxMap, source::BoxSet)
.