remove unneeded type assertions
This commit is contained in:
parent
0dac9efc78
commit
d373253d76
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue