remove unneeded type assertions

This commit is contained in:
filifa 2025-05-02 20:27:12 -04:00
parent 0dac9efc78
commit d373253d76
1 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ func NewAbsorbingMarkovChain() *AbsorbingMarkovChain {
func (g *AbsorbingMarkovChain) IsValid() bool {
for nodes := g.Nodes(); nodes.Next(); {
u := nodes.Node().(*node)
u := nodes.Node()
if g.outWeightSum(u) != 1 {
return false
}
@ -95,7 +95,7 @@ func (g *AbsorbingMarkovChain) AdjacencyMatrix() mat.Matrix {
nodes := adj.Nodes()
for i := 0; nodes.Next(); i++ {
id := nodes.Node().ID()
u := g.Node(id).(*node)
u := g.Node(id)
e := g.WeightedEdge(u.ID(), u.ID())
if e != nil {