Skip to content

help keeping track of variable ids #116

Open

Description

@marcrasi

Sometimes you have a "name" for a variable when you create it, and you want to easily go between the "name" and the variable's TypedID. Examples:

  • [WIP] Chordal Initialization #108 -> ChordalInitialization.swift -> solveOrientationGraph: This takes a factor graph g as input and constructs a corresponding "unconstrained chordal graph" that has one variable per variable in g. (The variables in the "unconstrained chordal graph" have a different type from the variables in g). Then it solves the "unconstrained chordal graph" and finally it reads the solution and uses it to construct good initial values for variables in g.
  • You read a factor graph from a file on disk, and the variables have string identifiers. You want to solve the graph and then write the solution to disk, using the string variable identifiers.

Having a convenient pattern/utility/something for doing this would be convenient.

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

Metadata

Metadata

Assignees

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