opeltre / topos

Statistics and Topology
MIT License
8 stars 0 forks source link

Harmonise domain and system interface #12

Closed opeltre closed 2 years ago

opeltre commented 2 years ago

Complex now inherits from domain so that K.field, K.zeros, K.randn... is transfered but both interfaces are not fully consistent.

For starters:

opeltre commented 2 years ago

1) K.field etc. solved by #11 2) K[key] calls are almost all replaced by K.get(key) - rest is quite linked to #14

Much functionality could be passed to the Fiber/Cell type, for instance when assuming keys are simplicial. This could be passed with something like

K = Sheaf({k: shape[k]}, ftype='simplicial', graded=0)

def Sheaf__init__(...):
    self.ftype = Fiber if ftype == None else SimplicialFiber

where SimplicialFiber has extra functionality from Chain e.g. Chain.read(key) -> maybe just call it Simplex

opeltre commented 2 years ago

The Complex type should just inherit from a Union [Sheaf] type for the access to graded components (simplicial structure on fiber keys might be done by fiber_type=Simplex argument)

Harmonise to K.get(key, degree=0)?

opeltre commented 2 years ago

solved by #17