Skip to content

GraphicalModels: multiple uses of gaussianRing #3553

@taboege

Description

@taboege

Multiple uses of gaussianRing Graph from the GraphicalModels package do not work as expected. The code below constructs rings for two different DAGs, but they turn out to be the same (they should already differ in their generators). It looks like the .graph field in both rings is equal to the first DAG.

This impairs all downstream functionality that requires a gaussianRing constructed from a specific graph, like gaussianVanishingIdeal. Multiple people I talked to, including @bkholler, have noticed this and don't know any workaround.

needsPackage "GraphicalModels";
DAGs = {
  digraph({1,2,3},{{1,2}}),
  digraph({1,2,3},{{1,2},{2,3}})
};
L = DAGs / gaussianRing;
print (L#0).graph;
print (L#1).graph;

It seems that gaussianRing maintains a cache of rings it has constructed before. Perhaps the indexing of that cache does not work as intended?

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