You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
StockAndFlowF is currently stored as a NamedTuple of ACSetTables. NamedTuples such that T <: NTuple{N, AbstractVector} implement columnaccess, and ACSetTable implements column access, but this doesn't work recursively; that is, when accessing the tables of a StockAndFlowF, one columnaccess is false. If I understand correctly, though, it wouldn't be wrong to define it to be true for NamedTuples of ACSetTables or ACSetTables of NamedTuples; it simply means that accessing it is O(1), and we can just define columns(x) = x.
Intention is to be able to manipulate StockAndFlowF tables using Table Operations.
It may fall on Catlab.DenseACSets to implement this instead.
I've implemented a bit of a workaround which works specifically with NamedTuples containing ACSetTables:
const NamedACSetTable = NamedTuple{names, T} where {names, T <: NTuple{N, ACSetTable} where N}
Tables.columnaccess(x::NamedACSetTable) = true
Tables.columns(x::NamedACSetTable) = x
Tables.rowaccess(x::NamedACSetTable) = true
The text was updated successfully, but these errors were encountered:
StockAndFlowF is currently stored as a NamedTuple of ACSetTables. NamedTuples such that T <: NTuple{N, AbstractVector} implement columnaccess, and ACSetTable implements column access, but this doesn't work recursively; that is, when accessing the tables of a StockAndFlowF, one columnaccess is false. If I understand correctly, though, it wouldn't be wrong to define it to be true for NamedTuples of ACSetTables or ACSetTables of NamedTuples; it simply means that accessing it is O(1), and we can just define columns(x) = x.
Intention is to be able to manipulate StockAndFlowF tables using Table Operations.
It may fall on Catlab.DenseACSets to implement this instead.
I've implemented a bit of a workaround which works specifically with NamedTuples containing ACSetTables:
const NamedACSetTable = NamedTuple{names, T} where {names, T <: NTuple{N, ACSetTable} where N}
Tables.columnaccess(x::NamedACSetTable) = true
Tables.columns(x::NamedACSetTable) = x
Tables.rowaccess(x::NamedACSetTable) = true
The text was updated successfully, but these errors were encountered: