Skip to content

Fixed() placement #321

Open
Open

Description

@brandmaier

I was recently confused that those statements are not equivalent:

graph = @StenoGraph begin
       a ↔ fixed(1)*b
       end

which yields
a ↔ b * Fixed{Tuple{Int64}}((1,))

 graph = @StenoGraph begin
       fixed(1)*b ↔ a
 end

which yields
b ↔ a

I think the documentation needs to be expanded to explain how exactly the fixed() modifier is supposed to be used.

Activity

  1. brandmaier commented on Oct 6, 2026

    @brandmaier
    ContributorAuthor

    @aaronpeikert, can you please comment on this if you find time?

  2. aaronpeikert commented on Oct 7, 2026

    @aaronpeikert
    Collaborator

    This is indeed something to wrap your head around but actually intended behavior.
    Fundamentally, this is the difference between Arrows and Edges.
    Edges behave exactly like you'd expect:

    using StenoGraphs, StructuralEquationModels
    
    a = Node(:a)
    b = Node(:b)
    
    UndirectedEdge(fixed(1)*b, a) == UndirectedEdge(a, fixed(1)*b) == @StenoGraph(b ↔ a*fixed(1))[1]

    Arrows behave that way (i.e. ignore modifiers on the left side) because they are chainable. Otherwise this would be ambiguous:

    graph = @StenoGraph begin
        a ↔ b*fixed(1) ↔ c
    end

    More fundamentally, that already a ↔ b ↔ c is ambiguous (and why) is explained here:

    https://aaronpeikert.github.io/StenoGraphs.jl/dev/man/arrows/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions