File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,9 +76,11 @@ type MtxReader(pathToFile: string) =
7676 ( fun line ->
7777 let i = int line.[ 0 ]
7878 let j = int line.[ 1 ]
79+
7980 let v =
8081 converter
8182 <| if line.Length > 2 then line.[ 2 ] else " "
83+
8284 struct ( pack i j, v))
8385 |> Array.sortBy ( fun struct ( packedIndex , _ ) -> packedIndex)
8486 | Symmetric ->
@@ -89,14 +91,21 @@ type MtxReader(pathToFile: string) =
8991 ( fun line ->
9092 let i = int line.[ 0 ]
9193 let j = int line.[ 1 ]
94+
9295 let v =
9396 converter
9497 <| if line.Length > 2 then line.[ 2 ] else " "
95- if i = j then [| struct ( pack i j, v) |]
96- else [| struct ( pack i j, v); struct ( pack j i, v) |])
98+
99+ if i = j then
100+ [| struct ( pack i j, v) |]
101+ else
102+ [| struct ( pack i j, v)
103+ struct ( pack j i, v) |])
97104 |> Array.concat
98105 |> Array.sortBy ( fun struct ( packedIndex , _ ) -> packedIndex)
99- | _ -> failwith <| sprintf " This symmetry processing is not implemented: %A " this.Symmetry
106+ | _ ->
107+ failwith
108+ <| sprintf " This symmetry processing is not implemented: %A " this.Symmetry
100109
101110 let rows = Array.zeroCreate sortedData.Length
102111 let cols = Array.zeroCreate sortedData.Length
You can’t perform that action at this time.
0 commit comments