AlgebraicJulia / AlgebraicJulia/ACSets.jl

Group assignment for unique indexed attributes

Ouverte
#14 6 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
Julia
Étoiles
36
Forks
11
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

I've run into an issue where the incidence table fails to update for unique indexed attributes. My example uses [`NamedGraphs`](https://github.com/AlgebraicJulia/Catlab.jl/blob/master/src/programs/DiagrammaticPrograms.jl#L24-L37), which have `:vname` as a uniquely indexed attribute:
```julia
using Catlab.Programs.DiagrammaticPrograms: NamedGraph
g = NamedGraph{Symbol, Symbol}()
add_parts!(g, :V, 3, vname=[:a, :b, :c])
```
Updating a single attribute acts as I'd expect:
```julia
g[1, :vname] = :d
incident(g, :d, :vname) # returns [1]
```
Whereas if I try to update over a range, it seems like the incidence table doesn't update:
```julia
g[1:2, :vname] .= [:e, :f]
incident(g, :e, :vname) # returns [0]
incident(g, :a, :vname) # returns [1]
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.