Currently, if layers are nested within networks and/or time points, the resulting network object ends up containing the lists of constituent networks (with edges stripped) in .subnetcache and the blocks are identified by vertex attributes. The top-level network ends up containing:
- All the vertex attributes of the constituent networks and their constituent networks in turn.
- Specifically for vertex attributes that are used to identify blocks, each vertex in fact has a vector, and if there are multiple combinings on the same attribute, the most recent merging's IDs is prepended to the vector.
- Globally unique vertex IDs that are then used by the
.block_blacklist constraint in combination with network attributes indicating block combinations to be blacklisted.
- A series of
blockdiag() constraints, e.g., blockdiag(".LayerID") + blockdiag(".NetworkID").
In a perfect world, we should be able to combine networks with different, possibly incompatible constraints, and have it just work (TM). In principle, this can be accomplished as follows:
- Implement an operator constraint, e.g.,
BlockDiag(attr, constraints) where constraints is a list of constraint formulas with an element for each block.
- For each block, it will initialise a proposal on its constraints. The stored constituent networks can be used to initialise these subproposals.
- When sampling, it will select a block, then call its proposal function to generate a proposal.
- This will create some overhead, since those proposal functions will need
Network data structures to keep track of things.
- The combining function no longer needs to keep track of the whole stack of things, just the networks it's combining.
- Rather than try to harmonise the proposals from constituent networks, the combining function can simply call
BlockDiag(combining_attr, list(~subnet1_constraints, ~subnet2_constraints, ...)).
Currently, if layers are nested within networks and/or time points, the resulting network object ends up containing the lists of constituent networks (with edges stripped) in
.subnetcacheand the blocks are identified by vertex attributes. The top-level network ends up containing:.block_blacklistconstraint in combination with network attributes indicating block combinations to be blacklisted.blockdiag()constraints, e.g.,blockdiag(".LayerID") + blockdiag(".NetworkID").In a perfect world, we should be able to combine networks with different, possibly incompatible constraints, and have it just work (TM). In principle, this can be accomplished as follows:
BlockDiag(attr, constraints)whereconstraintsis a list of constraint formulas with an element for each block.Networkdata structures to keep track of things.BlockDiag(combining_attr, list(~subnet1_constraints, ~subnet2_constraints, ...)).