From 8060b68a2dfa4135bd7aecc4f781b351dce526ba Mon Sep 17 00:00:00 2001 From: Kevin Schneider Date: Mon, 30 May 2022 15:04:41 +0200 Subject: [PATCH 1/2] Fix index errors on ommitted rows + ommitted cols formatting --- src/FSharp.Stats/AlgTypes.fs | 42 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/FSharp.Stats/AlgTypes.fs b/src/FSharp.Stats/AlgTypes.fs index 8108e632..f7daafd9 100644 --- a/src/FSharp.Stats/AlgTypes.fs +++ b/src/FSharp.Stats/AlgTypes.fs @@ -2193,46 +2193,46 @@ namespace FSharp.Stats elif displayRows >= nRows && displayCols < nCols then // this formats the matrix with only ommitted cols Array.init (nRows+2) (fun rowIndex -> match rowIndex with - | 0 -> + | 0 -> // column index header row [| "";""; yield! [for i in [0 .. columnStartCount-1] do yield string i]; "..."; yield! [for i in [nCols - columnEndCount .. nCols - 1] do yield string i] |] - | 1 -> [|for i in 0 .. (displayCols + 2) do yield ""|] + | 1 -> [|for i in 0 .. (displayCols + 2) do yield ""|] // empty row to distinguish column indices from data in FSI/StructuredDisplay | _ -> // the rest of the rows contain data Array.init (columnStartCount+columnEndCount+3) (fun colIndex -> - if (colIndex-2) < columnStartCount then + if (colIndex-2) < columnStartCount then // left match colIndex with | 0 -> string (rowIndex-2) | 1 -> "->" | _ -> m.[rowIndex-2,colIndex-2] |> formatValue - elif (colIndex-2) > columnStartCount then + elif (colIndex-2) > columnStartCount then // right m[rowIndex-2,(nCols - 3 - columnEndCount + colIndex - columnStartCount)] |> formatValue else - "..." + "..." // separator for signalling ommitted cols ) ) elif displayRows < nRows && displayCols >= nCols then // this formats the matrix with only ommitted rows Array.init (rowStartCount+rowEndCount+3) (fun rowIndex -> match rowIndex with - | 0 -> [|"";"";yield! [for i = 0 to nCols-1 do yield string i]|] - | 1 -> [|for i in 0 .. nCols+1 do yield ""|] + | 0 -> [|"";"";yield! [for i = 0 to nCols-1 do yield string i]|] // column index header row + | 1 -> [|for i in 0 .. nCols+1 do yield ""|] // empty row to distinguish column indices from data in FSI/StructuredDisplay | _ -> Array.init (nCols+2) (fun colIndex -> - if (rowIndex-2) < rowStartCount then + if (rowIndex-2) < rowStartCount then // upper half match colIndex with | 0 -> string (rowIndex-2) | 1 -> "->" | _ -> m.[rowIndex-2,colIndex-2] |> formatValue - elif (rowIndex-2) > rowStartCount then + elif (rowIndex-2) > rowStartCount then // lower half match colIndex with | 0 -> string (nRows - 3 - rowEndCount + rowIndex - rowStartCount) | 1 -> "->" | _ -> m[(nRows - 3 - rowEndCount + rowIndex - rowStartCount),colIndex - 2] |> formatValue else - match colIndex with + match colIndex with // separator for signalling ommitted rows | 0 -> ":" | 1 -> "" | _ -> "..." @@ -2241,33 +2241,33 @@ namespace FSharp.Stats else // this formats the matrix with ommitted rows and cols Array.init (rowStartCount+rowEndCount+3) (fun rowIndex -> match rowIndex with - | 0 -> + | 0 -> // column index header row [| "";""; yield! [for i in [0 .. columnStartCount-1] do yield string i]; "..."; yield! [for i in [nCols - columnEndCount .. nCols - 1] do yield string i] |] - | 1 -> [|for i in 0 .. (displayCols + 2) do yield ""|] + | 1 -> [|for i in 0 .. (displayCols + 2) do yield ""|] // empty row to distinguish column indices from data in FSI/StructuredDisplay | _ -> Array.init (columnStartCount+columnEndCount+3) (fun colIndex -> - if (rowIndex-2) < rowStartCount then - if (colIndex-2) < columnStartCount then + if (rowIndex-2) < rowStartCount then // upper half + if (colIndex-2) < columnStartCount then // upper left match colIndex with - | 0 -> string (rowIndex-2) + | 0 -> string (rowIndex-2) | 1 -> "->" - | _ -> m.[rowIndex-1,colIndex-2] |> formatValue - elif (colIndex-2) > columnStartCount then + | _ -> m.[rowIndex-2,colIndex-2] |> formatValue + elif (colIndex-2) > columnStartCount then // upper right m[rowIndex-2,(nCols - 3 - columnEndCount + colIndex - columnStartCount)] |> formatValue else "..." - elif (rowIndex-2) > rowStartCount then - if (colIndex-2) < columnStartCount then + elif (rowIndex-2) > rowStartCount then // lower half + if (colIndex-2) < columnStartCount then // lower left match colIndex with | 0 -> string (nRows - 3 - rowEndCount + rowIndex - rowStartCount) | 1 -> "->" - | _ -> m[(nRows - 3 - rowEndCount + rowIndex - rowStartCount),colIndex] |> formatValue - elif (colIndex-2) > columnStartCount then + | _ -> m[(nRows - 3 - rowEndCount + rowIndex - rowStartCount),(colIndex-2)] |> formatValue + elif (colIndex-2) > columnStartCount then // lower right m[(nRows - 3 - rowEndCount + rowIndex - rowStartCount),(nCols - 3 - columnEndCount + colIndex - columnStartCount)] |> formatValue else "..." From 8a559f561516a869991362c2fc6be767984055fd Mon Sep 17 00:00:00 2001 From: Kevin Schneider Date: Mon, 30 May 2022 15:05:11 +0200 Subject: [PATCH 2/2] Add int Matrix formatting tests --- src/FSharp.Stats.Interactive/test.ipynb | 60 ++++++++++++++--- src/FSharp.Stats/Playground.fsx | 34 ++++++++-- .../FSharp.Stats.Tests.fsproj | 8 +++ tests/FSharp.Stats.Tests/Formatting.fs | 32 ++++++--- .../data/DenseMatrixFormat4NoInfo.txt | 66 +++++++++---------- .../data/DenseMatrixFormat4WithInfo.txt | 66 +++++++++---------- .../data/DenseMatrixIntFormat1NoInfo.txt | 12 ++++ .../data/DenseMatrixIntFormat1WithInfo.txt | 14 ++++ .../data/DenseMatrixIntFormat2NoInfo.txt | 12 ++++ .../data/DenseMatrixIntFormat2WithInfo.txt | 14 ++++ .../data/DenseMatrixIntFormat3NoInfo.txt | 33 ++++++++++ .../data/DenseMatrixIntFormat3WithInfo.txt | 35 ++++++++++ .../data/DenseMatrixIntFormat4NoInfo.txt | 33 ++++++++++ .../data/DenseMatrixIntFormat4WithInfo.txt | 35 ++++++++++ .../data/New Text Document.txt | 0 15 files changed, 365 insertions(+), 89 deletions(-) create mode 100644 tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat1NoInfo.txt create mode 100644 tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat1WithInfo.txt create mode 100644 tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat2NoInfo.txt create mode 100644 tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat2WithInfo.txt create mode 100644 tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat3NoInfo.txt create mode 100644 tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat3WithInfo.txt create mode 100644 tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat4NoInfo.txt create mode 100644 tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat4WithInfo.txt create mode 100644 tests/FSharp.Stats.Tests/data/New Text Document.txt diff --git a/src/FSharp.Stats.Interactive/test.ipynb b/src/FSharp.Stats.Interactive/test.ipynb index e6956482..46596a70 100644 --- a/src/FSharp.Stats.Interactive/test.ipynb +++ b/src/FSharp.Stats.Interactive/test.ipynb @@ -31,6 +31,15 @@ }, "metadata": {}, "output_type": "display_data" + }, + { + "data": { + "text/markdown": [ + "Loading extensions from `FSharp.Stats.Interactive.dll`" + ] + }, + "metadata": {}, + "output_type": "display_data" } ], "source": [ @@ -62,11 +71,42 @@ "languageId": "dotnet-interactive.fsharp" } }, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
\r\n", + "\r\n", + "\r\n", + "\r\n", + "\r\n", + "
0123456789
0->00010203040506070809
1->10111213141516171819
2->20212223242526272829
3->30313233343536373839
4->40414243444546474849
5->50515253545556575859
6->60616263646566676869
7->70717273747576777879
8->80818283848586878889
9->90919293949596979899
\r\n", + "
\r\n", + "Matrix of 10 rows x 10 columns\r\n", + "
\r\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], "source": [ "open FSharp.Stats\n", "\n", - "let m = Matrix.init 5 5 (fun i j -> float i * float j)\n" + "Matrix.Generic.init 10 10 (fun r c -> $\"{r}{c}\" )\n" ] }, { @@ -101,7 +141,7 @@ "\r\n", "\r\n", "\r\n", - "\r\n", + "\r\n", "
0123456789
0->0.0000.0000.0000.0000.0000.0000.0000.0000.0000.000
1->0.0001.0002.0003.0004.0005.0006.0007.0008.0009.000
2->0.0002.0004.0006.0008.00010.00012.00014.00016.00018.000
3->0.0003.0006.0009.00012.00015.00018.00021.00024.00027.000
4->0.0004.0008.00012.00016.00020.00024.00028.00032.00036.000
:..............................
95->0.00095.000190.000285.000380.000475.000570.000665.000760.000855.000
96->0.00096.000192.000288.000384.000480.000576.000672.000768.000864.000
97->0.00097.000194.000291.000388.000485.000582.000679.000776.000873.000
98->0.00098.000196.000294.000392.000490.000588.000686.000784.000882.000
99->0.00099.000198.000297.000396.000495.000594.000693.000792.000891.000
0->00010203040506070809
1->10111213141516171819
2->20212223242526272829
3->30313233343536373839
4->40414243444546474849
:..............................
95->950951952953954955956957958959
96->960961962963964965966967968969
97->970971972973974975976977978979
98->980981982983984985986987988989
99->990991992993994995996997998999
\r\n", "
\r\n", "Matrix of 100 rows x 10 columns\r\n", @@ -113,7 +153,7 @@ } ], "source": [ - "Matrix.init 100 10 (fun i j -> float i * float j )\n" + "Matrix.Generic.init 100 10 (fun r c -> $\"{r}{c}\" )\n" ] }, { @@ -147,11 +187,11 @@ " }\r\n", "\r\n", "\r\n", - "\r\n", - "\r\n", + "\r\n", + "\r\n", "
0123456789...990991992993994995996997998999
0->0.0001.0002.0003.0004.0005.0006.0007.0008.0009.000...0.0000.0000.0000.0000.0000.0000.0000.0000.0000.000
1->0.0002.0004.0006.0008.00010.00012.00014.00016.00018.000...990.000991.000992.000993.000994.000995.000996.000997.000998.000999.000
2->0.0003.0006.0009.00012.00015.00018.00021.00024.00027.000...1980.0001982.0001984.0001986.0001988.0001990.0001992.0001994.0001996.0001998.000
3->0.0004.0008.00012.00016.00020.00024.00028.00032.00036.000...2970.0002973.0002976.0002979.0002982.0002985.0002988.0002991.0002994.0002997.000
4->0.0005.00010.00015.00020.00025.00030.00035.00040.00045.000...3960.0003964.0003968.0003972.0003976.0003980.0003984.0003988.0003992.0003996.000
:...............................................................
995->1990.0002985.0003980.0004975.0005970.0006965.0007960.0008955.0009950.0001.1e+04...9.9e+059.9e+059.9e+059.9e+059.9e+059.9e+059.9e+059.9e+059.9e+059.9e+05
996->1992.0002988.0003984.0004980.0005976.0006972.0007968.0008964.0009960.0001.1e+04...9.9e+059.9e+059.9e+059.9e+059.9e+059.9e+059.9e+059.9e+059.9e+051e+06
997->1994.0002991.0003988.0004985.0005982.0006979.0007976.0008973.0009970.0001.1e+04...9.9e+059.9e+059.9e+059.9e+059.9e+059.9e+059.9e+059.9e+051e+061e+06
998->1996.0002994.0003992.0004990.0005988.0006986.0007984.0008982.0009980.0001.1e+04...9.9e+059.9e+059.9e+059.9e+059.9e+059.9e+059.9e+051e+061e+061e+06
999->1998.0002997.0003996.0004995.0005994.0006993.0007992.0008991.0009990.0001.1e+04...9.9e+059.9e+059.9e+059.9e+059.9e+059.9e+051e+061e+061e+061e+06
0123456789...90919293949596979899
0->00010203040506070809...090091092093094095096097098099
1->10111213141516171819...190191192193194195196197198199
2->20212223242526272829...290291292293294295296297298299
3->30313233343536373839...390391392393394395396397398399
4->40414243444546474849...490491492493494495496497498499
5->50515253545556575859...590591592593594595596597598599
6->60616263646566676869...690691692693694695696697698699
7->70717273747576777879...790791792793794795796797798799
8->80818283848586878889...890891892893894895896897898899
9->90919293949596979899...990991992993994995996997998999
\r\n", "
\r\n", - "Matrix of 1000 rows x 1000 columns\r\n", + "Matrix of 10 rows x 100 columns\r\n", "\r\n" ] }, @@ -160,7 +200,7 @@ } ], "source": [ - "Matrix.init 1000 1000 (fun i j -> float i * float j )" + "Matrix.Generic.init 10 100 (fun r c -> $\"{r}{c}\" )" ] }, { @@ -195,7 +235,7 @@ "\r\n", "\r\n", "\r\n", - "\r\n", + "\r\n", "
0123456789...90919293949596979899
0->0.0001.0002.0003.0004.0005.0006.0007.0008.0009.000...0.0000.0000.0000.0000.0000.0000.0000.0000.0000.000
1->0.0002.0004.0006.0008.00010.00012.00014.00016.00018.000...90.00091.00092.00093.00094.00095.00096.00097.00098.00099.000
2->0.0003.0006.0009.00012.00015.00018.00021.00024.00027.000...180.000182.000184.000186.000188.000190.000192.000194.000196.000198.000
3->0.0004.0008.00012.00016.00020.00024.00028.00032.00036.000...270.000273.000276.000279.000282.000285.000288.000291.000294.000297.000
4->0.0005.00010.00015.00020.00025.00030.00035.00040.00045.000...360.000364.000368.000372.000376.000380.000384.000388.000392.000396.000
:...............................................................
95->190.000285.000380.000475.000570.000665.000760.000855.000950.0001045.000...8550.0008645.0008740.0008835.0008930.0009025.0009120.0009215.0009310.0009405.000
96->192.000288.000384.000480.000576.000672.000768.000864.000960.0001056.000...8640.0008736.0008832.0008928.0009024.0009120.0009216.0009312.0009408.0009504.000
97->194.000291.000388.000485.000582.000679.000776.000873.000970.0001067.000...8730.0008827.0008924.0009021.0009118.0009215.0009312.0009409.0009506.0009603.000
98->196.000294.000392.000490.000588.000686.000784.000882.000980.0001078.000...8820.0008918.0009016.0009114.0009212.0009310.0009408.0009506.0009604.0009702.000
99->198.000297.000396.000495.000594.000693.000792.000891.000990.0001089.000...8910.0009009.0009108.0009207.0009306.0009405.0009504.0009603.0009702.0009801.000
0->00010203040506070809...090091092093094095096097098099
1->10111213141516171819...190191192193194195196197198199
2->20212223242526272829...290291292293294295296297298299
3->30313233343536373839...390391392393394395396397398399
4->40414243444546474849...490491492493494495496497498499
:...............................................................
95->950951952953954955956957958959...9590959195929593959495959596959795989599
96->960961962963964965966967968969...9690969196929693969496959696969796989699
97->970971972973974975976977978979...9790979197929793979497959796979797989799
98->980981982983984985986987988989...9890989198929893989498959896989798989899
99->990991992993994995996997998999...9990999199929993999499959996999799989999
\r\n", "
\r\n", "Matrix of 100 rows x 100 columns\r\n", @@ -207,7 +247,7 @@ } ], "source": [ - "Matrix.init 100 100 (fun i j -> float i * float j )" + "Matrix.Generic.init 100 100 (fun r c -> $\"{r}{c}\" )" ] } ], diff --git a/src/FSharp.Stats/Playground.fsx b/src/FSharp.Stats/Playground.fsx index 2867c1b2..cad64eb6 100644 --- a/src/FSharp.Stats/Playground.fsx +++ b/src/FSharp.Stats/Playground.fsx @@ -2,9 +2,35 @@ #r "FSharp.Stats.dll" open FSharp.Stats -let rnd = new System.Random(1) -let m2 = Matrix.Generic.init 50 50 (fun i j -> int $"{i}{j}") -let m = Matrix.init 500 500 (fun i j -> float i * float j + (rnd.NextDouble())) +let rnd = new System.Random(69) -printfn "%s" (m.Format(true)) +let mDenseInt1 = Matrix.Generic.init 10 10 (fun r c -> $"{r}{c}" ) +let mDenseInt2 = Matrix.Generic.init 10 100 (fun r c -> $"{r}{c}" ) +let mDenseInt3 = Matrix.Generic.init 100 10 (fun r c -> $"{r}{c}" ) +let mDenseInt4 = Matrix.Generic.init 100 100 (fun r c -> $"{r}{c}" ) +mDenseInt1.Format(false) +mDenseInt1.Format(true) +mDenseInt2.Format(false) +mDenseInt2.Format(true) +mDenseInt3.Format(false) +mDenseInt3.Format(true) +mDenseInt4.Format(false) +mDenseInt4.Format(true) + +let mDense1 = Matrix.init 10 10 (fun i j -> float i * float j * rnd.NextDouble()) +let mDense2 = Matrix.init 10 100 (fun i j -> float i * float j * rnd.NextDouble()) +let mDense3 = Matrix.init 100 10 (fun i j -> float i * float j * rnd.NextDouble()) +let mDense4 = Matrix.init 100 100 (fun i j -> float i * float j * rnd.NextDouble()) +let mDenseSpecial = matrix[[nan;100000000.;infinity;1.4];[1.337;-nan;4269420.42;-infinity]] + +mDense1.Format(false) +mDense1.Format(true) +mDense2.Format(false) +mDense2.Format(true) +mDense3.Format(false) +mDense3.Format(true) +mDense4.Format(false) +mDense4.Format(true) +mDenseSpecial.Format(false) +mDenseSpecial.Format(true) diff --git a/tests/FSharp.Stats.Tests/FSharp.Stats.Tests.fsproj b/tests/FSharp.Stats.Tests/FSharp.Stats.Tests.fsproj index b69c1f10..02cf6403 100644 --- a/tests/FSharp.Stats.Tests/FSharp.Stats.Tests.fsproj +++ b/tests/FSharp.Stats.Tests/FSharp.Stats.Tests.fsproj @@ -41,6 +41,14 @@ + + + + + + + + diff --git a/tests/FSharp.Stats.Tests/Formatting.fs b/tests/FSharp.Stats.Tests/Formatting.fs index f77d3c43..23b34217 100644 --- a/tests/FSharp.Stats.Tests/Formatting.fs +++ b/tests/FSharp.Stats.Tests/Formatting.fs @@ -45,6 +45,20 @@ let formatTableTests = let matrixFormattingtests = testList "Formatting.MatrixFormatting" [ + let mDenseInt1 = Matrix.Generic.init 10 10 (fun r c -> $"{r}{c}" ) + let mDenseInt2 = Matrix.Generic.init 10 100 (fun r c -> $"{r}{c}" ) + let mDenseInt3 = Matrix.Generic.init 100 10 (fun r c -> $"{r}{c}" ) + let mDenseInt4 = Matrix.Generic.init 100 100 (fun r c -> $"{r}{c}" ) + + let mdense1_int_no_info = readEmbeddedRessource "DenseMatrixIntFormat1NoInfo.txt" + let mdense2_int_no_info = readEmbeddedRessource "DenseMatrixIntFormat2NoInfo.txt" + let mdense3_int_no_info = readEmbeddedRessource "DenseMatrixIntFormat3NoInfo.txt" + let mdense4_int_no_info = readEmbeddedRessource "DenseMatrixIntFormat4NoInfo.txt" + let mdense1_int_with_info = readEmbeddedRessource "DenseMatrixIntFormat1WithInfo.txt" + let mdense2_int_with_info = readEmbeddedRessource "DenseMatrixIntFormat2WithInfo.txt" + let mdense3_int_with_info = readEmbeddedRessource "DenseMatrixIntFormat3WithInfo.txt" + let mdense4_int_with_info = readEmbeddedRessource "DenseMatrixIntFormat4WithInfo.txt" + let rnd = new System.Random(69) let mDense1 = Matrix.init 10 10 (fun i j -> float i * float j * rnd.NextDouble()) @@ -71,27 +85,27 @@ let matrixFormattingtests = let msparse1_no_info = readEmbeddedRessource "SparseMatrixFormat1NoInfo.txt" let msparse1_with_info = readEmbeddedRessource "SparseMatrixFormat1WithInfo.txt" - testCase "dense float matrix full display no info" (fun _ -> Expect.equal (mDense1.Format(false)) mdense1_no_info "Incorrect format for this value") + testCase "dense int matrix full display no info" (fun _ -> Expect.equal (mDenseInt1.Format(false)) mdense1_int_no_info "Incorrect format for this value") + testCase "dense int matrix full display with info" (fun _ -> Expect.equal (mDenseInt1.Format(true)) mdense1_int_with_info "Incorrect format for this value") + testCase "dense int matrix omitted cols no info" (fun _ -> Expect.equal (mDenseInt2.Format(false)) mdense2_int_no_info "Incorrect format for this value") + testCase "dense int matrix omitted cols with info" (fun _ -> Expect.equal (mDenseInt2.Format(true)) mdense2_int_with_info "Incorrect format for this value") + testCase "dense int matrix omitted rows no info" (fun _ -> Expect.equal (mDenseInt3.Format(false)) mdense3_int_no_info "Incorrect format for this value") + testCase "dense int matrix omitted rows with info" (fun _ -> Expect.equal (mDenseInt3.Format(true)) mdense3_int_with_info "Incorrect format for this value") + testCase "dense int matrix omitted rows and cols no info" (fun _ -> Expect.equal (mDenseInt4.Format(false)) mdense4_int_no_info "Incorrect format for this value") + testCase "dense int matrix omitted rows and cols with info" (fun _ -> Expect.equal (mDenseInt4.Format(true)) mdense4_int_with_info "Incorrect format for this value" ) + testCase "dense float matrix full display no info" (fun _ -> Expect.equal (mDense1.Format(false)) mdense1_no_info "Incorrect format for this value") testCase "dense float matrix full display with info" (fun _ -> Expect.equal (mDense1.Format(true)) mdense1_with_info "Incorrect format for this value") - testCase "dense float matrix omitted cols no info" (fun _ -> Expect.equal (mDense2.Format(false)) mdense2_no_info "Incorrect format for this value") - testCase "dense float matrix omitted cols with info" (fun _ -> Expect.equal (mDense2.Format(true)) mdense2_with_info "Incorrect format for this value") - testCase "dense float matrix omitted rows no info" (fun _ -> Expect.equal (mDense3.Format(false)) mdense3_no_info "Incorrect format for this value") - testCase "dense float matrix omitted rows with info" (fun _ -> Expect.equal (mDense3.Format(true)) mdense3_with_info "Incorrect format for this value") - testCase "dense float matrix omitted rows and cols no info" (fun _ -> Expect.equal (mDense4.Format(false)) mdense4_no_info "Incorrect format for this value") - testCase "dense float matrix omitted rows and cols with info" (fun _ -> Expect.equal (mDense4.Format(true)) mdense4_with_info "Incorrect format for this value" ) testCase "dense float matrix with edge cases (+/- nan, +/- infinity) no info" (fun _ -> Expect.equal (mDenseSpecial.Format(true)) mdenseSpecial_with_info "Incorrect format for this value" ) - testCase "dense float matrix with edge cases (+/- nan, +/- infinity) with info" (fun _ -> Expect.equal (mDenseSpecial.Format(true)) mdenseSpecial_with_info "Incorrect format for this value" ) testCase "sparse float matrix full display no info" (fun _ -> Expect.equal (mSparse1.Format(false)) msparse1_no_info "Incorrect format for this value") - testCase "sparse float matrix full display with info" (fun _ -> Expect.equal (mSparse1.Format(true)) msparse1_with_info "Incorrect format for this value") ] \ No newline at end of file diff --git a/tests/FSharp.Stats.Tests/data/DenseMatrixFormat4NoInfo.txt b/tests/FSharp.Stats.Tests/data/DenseMatrixFormat4NoInfo.txt index 3e1745fb..0c65fdf9 100644 --- a/tests/FSharp.Stats.Tests/data/DenseMatrixFormat4NoInfo.txt +++ b/tests/FSharp.Stats.Tests/data/DenseMatrixFormat4NoInfo.txt @@ -1,33 +1,33 @@ - 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 - - 0 -> 0.000 0.529 0.873 2.800 0.905 3.353 1.289 6.381 3.010 3.252 3.711 10.828 6.136 3.723 13.354 ... 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 - 1 -> 0.000 0.578 0.788 3.013 6.916 1.074 8.196 11.855 13.041 4.023 4.793 7.982 3.674 15.233 4.160 ... 75.801 18.898 57.698 25.467 40.929 77.650 25.796 16.615 85.206 53.250 14.148 59.625 11.502 96.185 65.284 - 2 -> 0.000 1.118 4.503 8.788 7.450 3.705 13.049 19.729 13.625 11.977 26.147 31.094 24.031 29.374 17.244 ... 147.471 156.730 102.547 5.338 73.668 49.444 15.806 60.798 45.654 142.259 131.712 144.015 82.009 141.904 121.608 - 3 -> 0.000 1.169 4.415 8.561 4.177 17.695 3.308 26.933 29.367 7.066 35.622 22.205 20.743 14.349 9.917 ... 244.644 126.556 43.554 163.956 225.609 173.822 159.796 265.869 76.627 89.714 131.496 16.856 105.691 92.460 209.170 - 4 -> 0.000 4.524 7.888 9.607 17.457 0.306 11.439 5.504 20.414 24.204 16.898 38.762 8.731 58.314 69.632 ... 16.713 203.790 286.932 291.102 330.963 336.217 278.777 95.589 244.692 109.670 183.635 318.584 78.349 350.069 274.409 - 5 -> 0.000 0.047 4.121 5.761 7.626 8.161 9.619 31.054 28.594 42.659 4.011 23.175 31.881 64.223 60.231 ... 264.545 374.850 338.361 224.019 120.705 75.757 197.089 434.310 408.493 269.776 409.849 415.516 393.740 362.849 79.977 - 6 -> 0.000 5.342 12.301 4.290 19.705 23.540 26.782 0.911 13.634 11.160 29.231 40.063 4.352 71.709 44.453 ... 337.878 132.782 301.409 323.353 324.233 461.890 226.968 247.177 112.362 139.772 176.255 66.638 313.296 174.878 514.112 - 7 -> 0.000 7.921 5.941 23.229 19.724 7.676 31.045 29.147 51.442 67.763 34.229 85.258 76.647 34.910 4.464 ... 72.548 86.027 334.107 550.781 14.765 330.970 246.846 484.915 127.455 320.049 168.836 285.202 239.102 389.955 547.607 - 8 -> 0.000 4.012 17.044 7.450 1.595 4.542 23.906 0.825 39.877 72.870 78.892 97.406 47.274 1.792 123.518 ... 489.975 266.069 548.115 85.488 604.199 467.518 519.075 322.168 719.914 701.634 132.426 745.218 327.117 337.292 684.178 - 9 -> 0.000 6.426 18.127 2.540 9.615 43.313 39.628 21.694 8.293 49.229 29.199 68.634 81.025 62.407 17.244 ... 254.456 574.030 366.758 226.845 697.452 529.468 564.104 719.287 18.804 626.013 104.894 625.169 676.855 869.577 725.237 - 10 -> 0.000 1.916 15.309 31.563 29.945 34.555 2.164 6.854 74.936 40.873 33.498 83.429 25.666 88.146 146.706 ... 757.597 182.356 636.383 385.724 381.282 795.580 430.808 349.462 886.413 590.337 626.901 46.875 642.853 431.668 839.495 - 11 -> 0.000 3.638 3.514 0.386 32.409 55.537 25.510 2.715 46.432 100.824 113.174 52.487 41.905 5.175 97.681 ... 641.387 280.888 127.801 860.904 839.837 187.785 813.098 905.628 421.338 141.643 205.391 703.456 639.768 591.237 229.743 - 12 -> 0.000 2.077 0.562 33.381 38.564 63.239 68.992 58.000 30.998 28.500 70.465 12.305 84.680 34.242 20.384 ... 936.192 108.240 72.741 353.286 973.266 421.449 1051.022 164.455 886.421 1014.618 525.604 181.642 603.914 884.115 677.696 - 13 -> 0.000 2.111 14.847 18.120 18.011 57.661 15.543 61.431 23.831 70.455 138.801 30.324 89.580 180.465 7.954 ... 532.632 430.912 1032.861 1078.717 76.172 852.085 709.718 628.723 892.311 348.149 347.938 982.502 595.019 52.348 61.909 - 14 -> 0.000 0.675 6.770 29.105 53.102 52.425 16.541 32.803 24.284 126.257 106.427 145.659 162.738 178.945 147.643 ... 219.823 398.129 513.556 491.670 1096.574 207.844 161.146 142.099 510.745 1.904 1197.729 74.498 623.045 1110.252 471.717 - : ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... - 85 -> 121.806 4.449 16.793 327.578 100.791 57.726 565.264 535.246 122.442 272.689 651.825 356.182 667.890 515.488 1225.488 ... 5416.512 3133.189 2571.566 4014.137 2372.295 3628.895 7118.603 1829.817 4973.430 4516.299 7937.209 1536.300 1698.671 944.049 3283.056 - 86 -> 105.891 33.137 64.971 150.283 457.666 369.620 136.517 49.680 639.810 11.223 197.939 216.000 707.567 466.536 439.745 ... 2223.210 5983.848 86.574 6295.561 2568.867 5372.146 2951.421 4205.028 5816.305 1118.186 5890.141 6521.126 5114.603 7118.847 7099.432 - 87 -> 94.343 40.123 34.012 305.471 372.831 150.012 68.217 131.583 657.489 575.565 742.622 1117.466 439.937 682.290 609.841 ... 5643.359 6841.265 293.441 3264.109 2945.036 5677.997 3732.846 4721.548 7434.687 196.697 4681.785 1093.296 1442.105 3492.534 7013.545 - 88 -> 133.381 82.910 332.077 173.668 422.138 514.408 554.212 430.205 810.682 572.664 840.751 982.747 377.115 510.018 983.716 ... 2505.831 1735.069 5085.546 6239.398 15.014 3472.400 6212.248 190.067 4196.619 4808.894 4986.510 3893.319 5391.448 4941.816 2333.632 - 89 -> 164.086 21.792 135.157 80.036 491.708 316.695 278.505 153.091 264.112 262.547 434.116 918.655 271.062 706.297 779.770 ... 6730.465 6188.537 6948.444 2916.550 2282.292 3612.986 4299.206 6133.302 2499.048 5055.278 8098.833 5328.177 7017.662 6406.702 4653.487 - 90 -> 90.706 257.853 60.762 107.656 313.884 69.582 26.630 52.496 638.013 810.969 13.808 77.701 988.353 108.548 413.416 ... 5602.842 183.958 1005.078 3279.931 25.988 1512.070 7080.854 1228.568 3129.116 3926.970 2268.851 1590.904 3722.962 7587.112 1147.959 - 91 -> 25.725 55.973 136.325 272.049 183.699 190.744 45.324 400.715 461.149 237.234 227.457 956.547 1250.416 1092.977 32.565 ... 5750.600 5195.454 338.658 217.351 5709.195 5744.160 5244.375 6165.506 5148.552 5653.679 2025.197 7827.562 3711.028 8221.018 5210.631 - 92 -> 18.988 45.937 36.557 16.693 551.776 487.803 608.113 827.936 105.717 965.658 620.135 1080.083 594.109 122.437 558.322 ... 7279.823 3033.580 4129.001 1125.713 3118.908 6007.869 7618.297 8244.613 4618.580 4940.244 7683.478 5787.929 4239.315 7515.542 7348.586 - 93 -> 38.262 38.215 358.976 42.608 314.170 399.376 109.054 817.181 97.519 307.903 702.925 1045.147 402.679 1296.133 1304.952 ... 2798.868 2809.466 162.900 5956.140 789.608 7303.674 3996.364 8541.878 6066.736 7306.379 5101.265 8213.958 7751.730 8010.192 4472.806 - 94 -> 9.671 227.695 54.216 458.690 558.747 388.078 508.382 657.524 770.807 224.193 1114.785 1212.846 1119.382 878.040 373.753 ... 4140.978 386.735 7922.451 3623.586 1008.386 5196.351 4615.186 4130.571 7507.452 6277.388 169.601 6402.340 8985.614 8135.705 4531.890 - 95 -> 30.141 180.208 83.045 387.100 250.980 509.888 290.869 315.783 645.062 210.198 457.477 447.338 766.976 1319.663 834.371 ... 7960.489 6085.569 4954.773 3795.198 4322.706 5524.015 3729.493 1181.202 3027.043 3526.940 4784.044 190.829 6917.789 6213.412 1154.812 - 96 -> 55.889 76.809 277.112 40.456 207.985 281.524 662.676 247.922 271.158 969.988 169.134 1044.289 600.528 1235.160 1440.033 ... 7797.409 6.056 646.073 5182.352 4856.829 1632.947 5694.009 3941.509 8126.620 1438.446 4944.268 6529.732 7587.947 2997.643 8931.945 - 97 -> 98.432 241.058 119.992 484.366 550.355 154.677 357.822 262.762 529.444 651.399 1040.328 322.286 1009.843 1282.437 1086.260 ... 1516.961 7299.605 7050.671 4207.465 7573.702 1025.514 1412.649 5393.216 2002.291 4547.475 6371.506 1402.909 3799.099 5236.658 5699.003 - 98 -> 85.982 138.055 329.857 341.346 562.946 12.474 425.633 120.145 715.950 938.459 99.861 828.154 1255.346 1314.460 1345.354 ... 4238.059 7536.498 4556.223 4890.874 3096.930 503.061 8510.020 909.925 8394.635 5107.284 4145.574 5300.112 8946.610 5619.715 8810.497 - 99 -> 74.229 59.814 90.515 478.340 28.036 347.503 492.858 304.780 489.473 928.537 993.152 717.310 503.962 844.119 1444.956 ... 6259.917 2828.528 8545.715 2231.671 3463.213 8191.683 553.990 4689.324 779.949 1782.211 2840.371 4116.932 1877.515 163.961 6333.645 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 + + 0 -> 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 ... 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 1 -> 0.000 0.529 0.873 2.800 0.905 3.353 1.289 6.381 3.010 3.252 3.711 10.828 6.136 3.723 13.354 ... 75.801 18.898 57.698 25.467 40.929 77.650 25.796 16.615 85.206 53.250 14.148 59.625 11.502 96.185 65.284 + 2 -> 0.000 0.578 0.788 3.013 6.916 1.074 8.196 11.855 13.041 4.023 4.793 7.982 3.674 15.233 4.160 ... 147.471 156.730 102.547 5.338 73.668 49.444 15.806 60.798 45.654 142.259 131.712 144.015 82.009 141.904 121.608 + 3 -> 0.000 1.118 4.503 8.788 7.450 3.705 13.049 19.729 13.625 11.977 26.147 31.094 24.031 29.374 17.244 ... 244.644 126.556 43.554 163.956 225.609 173.822 159.796 265.869 76.627 89.714 131.496 16.856 105.691 92.460 209.170 + 4 -> 0.000 1.169 4.415 8.561 4.177 17.695 3.308 26.933 29.367 7.066 35.622 22.205 20.743 14.349 9.917 ... 16.713 203.790 286.932 291.102 330.963 336.217 278.777 95.589 244.692 109.670 183.635 318.584 78.349 350.069 274.409 + 5 -> 0.000 4.524 7.888 9.607 17.457 0.306 11.439 5.504 20.414 24.204 16.898 38.762 8.731 58.314 69.632 ... 264.545 374.850 338.361 224.019 120.705 75.757 197.089 434.310 408.493 269.776 409.849 415.516 393.740 362.849 79.977 + 6 -> 0.000 0.047 4.121 5.761 7.626 8.161 9.619 31.054 28.594 42.659 4.011 23.175 31.881 64.223 60.231 ... 337.878 132.782 301.409 323.353 324.233 461.890 226.968 247.177 112.362 139.772 176.255 66.638 313.296 174.878 514.112 + 7 -> 0.000 5.342 12.301 4.290 19.705 23.540 26.782 0.911 13.634 11.160 29.231 40.063 4.352 71.709 44.453 ... 72.548 86.027 334.107 550.781 14.765 330.970 246.846 484.915 127.455 320.049 168.836 285.202 239.102 389.955 547.607 + 8 -> 0.000 7.921 5.941 23.229 19.724 7.676 31.045 29.147 51.442 67.763 34.229 85.258 76.647 34.910 4.464 ... 489.975 266.069 548.115 85.488 604.199 467.518 519.075 322.168 719.914 701.634 132.426 745.218 327.117 337.292 684.178 + 9 -> 0.000 4.012 17.044 7.450 1.595 4.542 23.906 0.825 39.877 72.870 78.892 97.406 47.274 1.792 123.518 ... 254.456 574.030 366.758 226.845 697.452 529.468 564.104 719.287 18.804 626.013 104.894 625.169 676.855 869.577 725.237 + 10 -> 0.000 6.426 18.127 2.540 9.615 43.313 39.628 21.694 8.293 49.229 29.199 68.634 81.025 62.407 17.244 ... 757.597 182.356 636.383 385.724 381.282 795.580 430.808 349.462 886.413 590.337 626.901 46.875 642.853 431.668 839.495 + 11 -> 0.000 1.916 15.309 31.563 29.945 34.555 2.164 6.854 74.936 40.873 33.498 83.429 25.666 88.146 146.706 ... 641.387 280.888 127.801 860.904 839.837 187.785 813.098 905.628 421.338 141.643 205.391 703.456 639.768 591.237 229.743 + 12 -> 0.000 3.638 3.514 0.386 32.409 55.537 25.510 2.715 46.432 100.824 113.174 52.487 41.905 5.175 97.681 ... 936.192 108.240 72.741 353.286 973.266 421.449 1051.022 164.455 886.421 1014.618 525.604 181.642 603.914 884.115 677.696 + 13 -> 0.000 2.077 0.562 33.381 38.564 63.239 68.992 58.000 30.998 28.500 70.465 12.305 84.680 34.242 20.384 ... 532.632 430.912 1032.861 1078.717 76.172 852.085 709.718 628.723 892.311 348.149 347.938 982.502 595.019 52.348 61.909 + 14 -> 0.000 2.111 14.847 18.120 18.011 57.661 15.543 61.431 23.831 70.455 138.801 30.324 89.580 180.465 7.954 ... 219.823 398.129 513.556 491.670 1096.574 207.844 161.146 142.099 510.745 1.904 1197.729 74.498 623.045 1110.252 471.717 + : ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... + 85 -> 0.000 35.047 121.806 4.449 16.793 327.578 100.791 57.726 565.264 535.246 122.442 272.689 651.825 356.182 667.890 ... 5416.512 3133.189 2571.566 4014.137 2372.295 3628.895 7118.603 1829.817 4973.430 4516.299 7937.209 1536.300 1698.671 944.049 3283.056 + 86 -> 0.000 75.918 105.891 33.137 64.971 150.283 457.666 369.620 136.517 49.680 639.810 11.223 197.939 216.000 707.567 ... 2223.210 5983.848 86.574 6295.561 2568.867 5372.146 2951.421 4205.028 5816.305 1118.186 5890.141 6521.126 5114.603 7118.847 7099.432 + 87 -> 0.000 20.911 94.343 40.123 34.012 305.471 372.831 150.012 68.217 131.583 657.489 575.565 742.622 1117.466 439.937 ... 5643.359 6841.265 293.441 3264.109 2945.036 5677.997 3732.846 4721.548 7434.687 196.697 4681.785 1093.296 1442.105 3492.534 7013.545 + 88 -> 0.000 25.342 133.381 82.910 332.077 173.668 422.138 514.408 554.212 430.205 810.682 572.664 840.751 982.747 377.115 ... 2505.831 1735.069 5085.546 6239.398 15.014 3472.400 6212.248 190.067 4196.619 4808.894 4986.510 3893.319 5391.448 4941.816 2333.632 + 89 -> 0.000 57.667 164.086 21.792 135.157 80.036 491.708 316.695 278.505 153.091 264.112 262.547 434.116 918.655 271.062 ... 6730.465 6188.537 6948.444 2916.550 2282.292 3612.986 4299.206 6133.302 2499.048 5055.278 8098.833 5328.177 7017.662 6406.702 4653.487 + 90 -> 0.000 57.696 90.706 257.853 60.762 107.656 313.884 69.582 26.630 52.496 638.013 810.969 13.808 77.701 988.353 ... 5602.842 183.958 1005.078 3279.931 25.988 1512.070 7080.854 1228.568 3129.116 3926.970 2268.851 1590.904 3722.962 7587.112 1147.959 + 91 -> 0.000 7.194 25.725 55.973 136.325 272.049 183.699 190.744 45.324 400.715 461.149 237.234 227.457 956.547 1250.416 ... 5750.600 5195.454 338.658 217.351 5709.195 5744.160 5244.375 6165.506 5148.552 5653.679 2025.197 7827.562 3711.028 8221.018 5210.631 + 92 -> 0.000 16.316 18.988 45.937 36.557 16.693 551.776 487.803 608.113 827.936 105.717 965.658 620.135 1080.083 594.109 ... 7279.823 3033.580 4129.001 1125.713 3118.908 6007.869 7618.297 8244.613 4618.580 4940.244 7683.478 5787.929 4239.315 7515.542 7348.586 + 93 -> 0.000 90.494 38.262 38.215 358.976 42.608 314.170 399.376 109.054 817.181 97.519 307.903 702.925 1045.147 402.679 ... 2798.868 2809.466 162.900 5956.140 789.608 7303.674 3996.364 8541.878 6066.736 7306.379 5101.265 8213.958 7751.730 8010.192 4472.806 + 94 -> 0.000 73.798 9.671 227.695 54.216 458.690 558.747 388.078 508.382 657.524 770.807 224.193 1114.785 1212.846 1119.382 ... 4140.978 386.735 7922.451 3623.586 1008.386 5196.351 4615.186 4130.571 7507.452 6277.388 169.601 6402.340 8985.614 8135.705 4531.890 + 95 -> 0.000 93.150 30.141 180.208 83.045 387.100 250.980 509.888 290.869 315.783 645.062 210.198 457.477 447.338 766.976 ... 7960.489 6085.569 4954.773 3795.198 4322.706 5524.015 3729.493 1181.202 3027.043 3526.940 4784.044 190.829 6917.789 6213.412 1154.812 + 96 -> 0.000 89.984 55.889 76.809 277.112 40.456 207.985 281.524 662.676 247.922 271.158 969.988 169.134 1044.289 600.528 ... 7797.409 6.056 646.073 5182.352 4856.829 1632.947 5694.009 3941.509 8126.620 1438.446 4944.268 6529.732 7587.947 2997.643 8931.945 + 97 -> 0.000 29.113 98.432 241.058 119.992 484.366 550.355 154.677 357.822 262.762 529.444 651.399 1040.328 322.286 1009.843 ... 1516.961 7299.605 7050.671 4207.465 7573.702 1025.514 1412.649 5393.216 2002.291 4547.475 6371.506 1402.909 3799.099 5236.658 5699.003 + 98 -> 0.000 0.856 85.982 138.055 329.857 341.346 562.946 12.474 425.633 120.145 715.950 938.459 99.861 828.154 1255.346 ... 4238.059 7536.498 4556.223 4890.874 3096.930 503.061 8510.020 909.925 8394.635 5107.284 4145.574 5300.112 8946.610 5619.715 8810.497 + 99 -> 0.000 59.070 74.229 59.814 90.515 478.340 28.036 347.503 492.858 304.780 489.473 928.537 993.152 717.310 503.962 ... 6259.917 2828.528 8545.715 2231.671 3463.213 8191.683 553.990 4689.324 779.949 1782.211 2840.371 4116.932 1877.515 163.961 6333.645 diff --git a/tests/FSharp.Stats.Tests/data/DenseMatrixFormat4WithInfo.txt b/tests/FSharp.Stats.Tests/data/DenseMatrixFormat4WithInfo.txt index 41f5f701..35d20d3a 100644 --- a/tests/FSharp.Stats.Tests/data/DenseMatrixFormat4WithInfo.txt +++ b/tests/FSharp.Stats.Tests/data/DenseMatrixFormat4WithInfo.txt @@ -1,35 +1,35 @@ - 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 - - 0 -> 0.000 0.529 0.873 2.800 0.905 3.353 1.289 6.381 3.010 3.252 3.711 10.828 6.136 3.723 13.354 ... 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 - 1 -> 0.000 0.578 0.788 3.013 6.916 1.074 8.196 11.855 13.041 4.023 4.793 7.982 3.674 15.233 4.160 ... 75.801 18.898 57.698 25.467 40.929 77.650 25.796 16.615 85.206 53.250 14.148 59.625 11.502 96.185 65.284 - 2 -> 0.000 1.118 4.503 8.788 7.450 3.705 13.049 19.729 13.625 11.977 26.147 31.094 24.031 29.374 17.244 ... 147.471 156.730 102.547 5.338 73.668 49.444 15.806 60.798 45.654 142.259 131.712 144.015 82.009 141.904 121.608 - 3 -> 0.000 1.169 4.415 8.561 4.177 17.695 3.308 26.933 29.367 7.066 35.622 22.205 20.743 14.349 9.917 ... 244.644 126.556 43.554 163.956 225.609 173.822 159.796 265.869 76.627 89.714 131.496 16.856 105.691 92.460 209.170 - 4 -> 0.000 4.524 7.888 9.607 17.457 0.306 11.439 5.504 20.414 24.204 16.898 38.762 8.731 58.314 69.632 ... 16.713 203.790 286.932 291.102 330.963 336.217 278.777 95.589 244.692 109.670 183.635 318.584 78.349 350.069 274.409 - 5 -> 0.000 0.047 4.121 5.761 7.626 8.161 9.619 31.054 28.594 42.659 4.011 23.175 31.881 64.223 60.231 ... 264.545 374.850 338.361 224.019 120.705 75.757 197.089 434.310 408.493 269.776 409.849 415.516 393.740 362.849 79.977 - 6 -> 0.000 5.342 12.301 4.290 19.705 23.540 26.782 0.911 13.634 11.160 29.231 40.063 4.352 71.709 44.453 ... 337.878 132.782 301.409 323.353 324.233 461.890 226.968 247.177 112.362 139.772 176.255 66.638 313.296 174.878 514.112 - 7 -> 0.000 7.921 5.941 23.229 19.724 7.676 31.045 29.147 51.442 67.763 34.229 85.258 76.647 34.910 4.464 ... 72.548 86.027 334.107 550.781 14.765 330.970 246.846 484.915 127.455 320.049 168.836 285.202 239.102 389.955 547.607 - 8 -> 0.000 4.012 17.044 7.450 1.595 4.542 23.906 0.825 39.877 72.870 78.892 97.406 47.274 1.792 123.518 ... 489.975 266.069 548.115 85.488 604.199 467.518 519.075 322.168 719.914 701.634 132.426 745.218 327.117 337.292 684.178 - 9 -> 0.000 6.426 18.127 2.540 9.615 43.313 39.628 21.694 8.293 49.229 29.199 68.634 81.025 62.407 17.244 ... 254.456 574.030 366.758 226.845 697.452 529.468 564.104 719.287 18.804 626.013 104.894 625.169 676.855 869.577 725.237 - 10 -> 0.000 1.916 15.309 31.563 29.945 34.555 2.164 6.854 74.936 40.873 33.498 83.429 25.666 88.146 146.706 ... 757.597 182.356 636.383 385.724 381.282 795.580 430.808 349.462 886.413 590.337 626.901 46.875 642.853 431.668 839.495 - 11 -> 0.000 3.638 3.514 0.386 32.409 55.537 25.510 2.715 46.432 100.824 113.174 52.487 41.905 5.175 97.681 ... 641.387 280.888 127.801 860.904 839.837 187.785 813.098 905.628 421.338 141.643 205.391 703.456 639.768 591.237 229.743 - 12 -> 0.000 2.077 0.562 33.381 38.564 63.239 68.992 58.000 30.998 28.500 70.465 12.305 84.680 34.242 20.384 ... 936.192 108.240 72.741 353.286 973.266 421.449 1051.022 164.455 886.421 1014.618 525.604 181.642 603.914 884.115 677.696 - 13 -> 0.000 2.111 14.847 18.120 18.011 57.661 15.543 61.431 23.831 70.455 138.801 30.324 89.580 180.465 7.954 ... 532.632 430.912 1032.861 1078.717 76.172 852.085 709.718 628.723 892.311 348.149 347.938 982.502 595.019 52.348 61.909 - 14 -> 0.000 0.675 6.770 29.105 53.102 52.425 16.541 32.803 24.284 126.257 106.427 145.659 162.738 178.945 147.643 ... 219.823 398.129 513.556 491.670 1096.574 207.844 161.146 142.099 510.745 1.904 1197.729 74.498 623.045 1110.252 471.717 - : ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... - 85 -> 121.806 4.449 16.793 327.578 100.791 57.726 565.264 535.246 122.442 272.689 651.825 356.182 667.890 515.488 1225.488 ... 5416.512 3133.189 2571.566 4014.137 2372.295 3628.895 7118.603 1829.817 4973.430 4516.299 7937.209 1536.300 1698.671 944.049 3283.056 - 86 -> 105.891 33.137 64.971 150.283 457.666 369.620 136.517 49.680 639.810 11.223 197.939 216.000 707.567 466.536 439.745 ... 2223.210 5983.848 86.574 6295.561 2568.867 5372.146 2951.421 4205.028 5816.305 1118.186 5890.141 6521.126 5114.603 7118.847 7099.432 - 87 -> 94.343 40.123 34.012 305.471 372.831 150.012 68.217 131.583 657.489 575.565 742.622 1117.466 439.937 682.290 609.841 ... 5643.359 6841.265 293.441 3264.109 2945.036 5677.997 3732.846 4721.548 7434.687 196.697 4681.785 1093.296 1442.105 3492.534 7013.545 - 88 -> 133.381 82.910 332.077 173.668 422.138 514.408 554.212 430.205 810.682 572.664 840.751 982.747 377.115 510.018 983.716 ... 2505.831 1735.069 5085.546 6239.398 15.014 3472.400 6212.248 190.067 4196.619 4808.894 4986.510 3893.319 5391.448 4941.816 2333.632 - 89 -> 164.086 21.792 135.157 80.036 491.708 316.695 278.505 153.091 264.112 262.547 434.116 918.655 271.062 706.297 779.770 ... 6730.465 6188.537 6948.444 2916.550 2282.292 3612.986 4299.206 6133.302 2499.048 5055.278 8098.833 5328.177 7017.662 6406.702 4653.487 - 90 -> 90.706 257.853 60.762 107.656 313.884 69.582 26.630 52.496 638.013 810.969 13.808 77.701 988.353 108.548 413.416 ... 5602.842 183.958 1005.078 3279.931 25.988 1512.070 7080.854 1228.568 3129.116 3926.970 2268.851 1590.904 3722.962 7587.112 1147.959 - 91 -> 25.725 55.973 136.325 272.049 183.699 190.744 45.324 400.715 461.149 237.234 227.457 956.547 1250.416 1092.977 32.565 ... 5750.600 5195.454 338.658 217.351 5709.195 5744.160 5244.375 6165.506 5148.552 5653.679 2025.197 7827.562 3711.028 8221.018 5210.631 - 92 -> 18.988 45.937 36.557 16.693 551.776 487.803 608.113 827.936 105.717 965.658 620.135 1080.083 594.109 122.437 558.322 ... 7279.823 3033.580 4129.001 1125.713 3118.908 6007.869 7618.297 8244.613 4618.580 4940.244 7683.478 5787.929 4239.315 7515.542 7348.586 - 93 -> 38.262 38.215 358.976 42.608 314.170 399.376 109.054 817.181 97.519 307.903 702.925 1045.147 402.679 1296.133 1304.952 ... 2798.868 2809.466 162.900 5956.140 789.608 7303.674 3996.364 8541.878 6066.736 7306.379 5101.265 8213.958 7751.730 8010.192 4472.806 - 94 -> 9.671 227.695 54.216 458.690 558.747 388.078 508.382 657.524 770.807 224.193 1114.785 1212.846 1119.382 878.040 373.753 ... 4140.978 386.735 7922.451 3623.586 1008.386 5196.351 4615.186 4130.571 7507.452 6277.388 169.601 6402.340 8985.614 8135.705 4531.890 - 95 -> 30.141 180.208 83.045 387.100 250.980 509.888 290.869 315.783 645.062 210.198 457.477 447.338 766.976 1319.663 834.371 ... 7960.489 6085.569 4954.773 3795.198 4322.706 5524.015 3729.493 1181.202 3027.043 3526.940 4784.044 190.829 6917.789 6213.412 1154.812 - 96 -> 55.889 76.809 277.112 40.456 207.985 281.524 662.676 247.922 271.158 969.988 169.134 1044.289 600.528 1235.160 1440.033 ... 7797.409 6.056 646.073 5182.352 4856.829 1632.947 5694.009 3941.509 8126.620 1438.446 4944.268 6529.732 7587.947 2997.643 8931.945 - 97 -> 98.432 241.058 119.992 484.366 550.355 154.677 357.822 262.762 529.444 651.399 1040.328 322.286 1009.843 1282.437 1086.260 ... 1516.961 7299.605 7050.671 4207.465 7573.702 1025.514 1412.649 5393.216 2002.291 4547.475 6371.506 1402.909 3799.099 5236.658 5699.003 - 98 -> 85.982 138.055 329.857 341.346 562.946 12.474 425.633 120.145 715.950 938.459 99.861 828.154 1255.346 1314.460 1345.354 ... 4238.059 7536.498 4556.223 4890.874 3096.930 503.061 8510.020 909.925 8394.635 5107.284 4145.574 5300.112 8946.610 5619.715 8810.497 - 99 -> 74.229 59.814 90.515 478.340 28.036 347.503 492.858 304.780 489.473 928.537 993.152 717.310 503.962 844.119 1444.956 ... 6259.917 2828.528 8545.715 2231.671 3463.213 8191.683 553.990 4689.324 779.949 1782.211 2840.371 4116.932 1877.515 163.961 6333.645 + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 + + 0 -> 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 ... 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 + 1 -> 0.000 0.529 0.873 2.800 0.905 3.353 1.289 6.381 3.010 3.252 3.711 10.828 6.136 3.723 13.354 ... 75.801 18.898 57.698 25.467 40.929 77.650 25.796 16.615 85.206 53.250 14.148 59.625 11.502 96.185 65.284 + 2 -> 0.000 0.578 0.788 3.013 6.916 1.074 8.196 11.855 13.041 4.023 4.793 7.982 3.674 15.233 4.160 ... 147.471 156.730 102.547 5.338 73.668 49.444 15.806 60.798 45.654 142.259 131.712 144.015 82.009 141.904 121.608 + 3 -> 0.000 1.118 4.503 8.788 7.450 3.705 13.049 19.729 13.625 11.977 26.147 31.094 24.031 29.374 17.244 ... 244.644 126.556 43.554 163.956 225.609 173.822 159.796 265.869 76.627 89.714 131.496 16.856 105.691 92.460 209.170 + 4 -> 0.000 1.169 4.415 8.561 4.177 17.695 3.308 26.933 29.367 7.066 35.622 22.205 20.743 14.349 9.917 ... 16.713 203.790 286.932 291.102 330.963 336.217 278.777 95.589 244.692 109.670 183.635 318.584 78.349 350.069 274.409 + 5 -> 0.000 4.524 7.888 9.607 17.457 0.306 11.439 5.504 20.414 24.204 16.898 38.762 8.731 58.314 69.632 ... 264.545 374.850 338.361 224.019 120.705 75.757 197.089 434.310 408.493 269.776 409.849 415.516 393.740 362.849 79.977 + 6 -> 0.000 0.047 4.121 5.761 7.626 8.161 9.619 31.054 28.594 42.659 4.011 23.175 31.881 64.223 60.231 ... 337.878 132.782 301.409 323.353 324.233 461.890 226.968 247.177 112.362 139.772 176.255 66.638 313.296 174.878 514.112 + 7 -> 0.000 5.342 12.301 4.290 19.705 23.540 26.782 0.911 13.634 11.160 29.231 40.063 4.352 71.709 44.453 ... 72.548 86.027 334.107 550.781 14.765 330.970 246.846 484.915 127.455 320.049 168.836 285.202 239.102 389.955 547.607 + 8 -> 0.000 7.921 5.941 23.229 19.724 7.676 31.045 29.147 51.442 67.763 34.229 85.258 76.647 34.910 4.464 ... 489.975 266.069 548.115 85.488 604.199 467.518 519.075 322.168 719.914 701.634 132.426 745.218 327.117 337.292 684.178 + 9 -> 0.000 4.012 17.044 7.450 1.595 4.542 23.906 0.825 39.877 72.870 78.892 97.406 47.274 1.792 123.518 ... 254.456 574.030 366.758 226.845 697.452 529.468 564.104 719.287 18.804 626.013 104.894 625.169 676.855 869.577 725.237 + 10 -> 0.000 6.426 18.127 2.540 9.615 43.313 39.628 21.694 8.293 49.229 29.199 68.634 81.025 62.407 17.244 ... 757.597 182.356 636.383 385.724 381.282 795.580 430.808 349.462 886.413 590.337 626.901 46.875 642.853 431.668 839.495 + 11 -> 0.000 1.916 15.309 31.563 29.945 34.555 2.164 6.854 74.936 40.873 33.498 83.429 25.666 88.146 146.706 ... 641.387 280.888 127.801 860.904 839.837 187.785 813.098 905.628 421.338 141.643 205.391 703.456 639.768 591.237 229.743 + 12 -> 0.000 3.638 3.514 0.386 32.409 55.537 25.510 2.715 46.432 100.824 113.174 52.487 41.905 5.175 97.681 ... 936.192 108.240 72.741 353.286 973.266 421.449 1051.022 164.455 886.421 1014.618 525.604 181.642 603.914 884.115 677.696 + 13 -> 0.000 2.077 0.562 33.381 38.564 63.239 68.992 58.000 30.998 28.500 70.465 12.305 84.680 34.242 20.384 ... 532.632 430.912 1032.861 1078.717 76.172 852.085 709.718 628.723 892.311 348.149 347.938 982.502 595.019 52.348 61.909 + 14 -> 0.000 2.111 14.847 18.120 18.011 57.661 15.543 61.431 23.831 70.455 138.801 30.324 89.580 180.465 7.954 ... 219.823 398.129 513.556 491.670 1096.574 207.844 161.146 142.099 510.745 1.904 1197.729 74.498 623.045 1110.252 471.717 + : ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... + 85 -> 0.000 35.047 121.806 4.449 16.793 327.578 100.791 57.726 565.264 535.246 122.442 272.689 651.825 356.182 667.890 ... 5416.512 3133.189 2571.566 4014.137 2372.295 3628.895 7118.603 1829.817 4973.430 4516.299 7937.209 1536.300 1698.671 944.049 3283.056 + 86 -> 0.000 75.918 105.891 33.137 64.971 150.283 457.666 369.620 136.517 49.680 639.810 11.223 197.939 216.000 707.567 ... 2223.210 5983.848 86.574 6295.561 2568.867 5372.146 2951.421 4205.028 5816.305 1118.186 5890.141 6521.126 5114.603 7118.847 7099.432 + 87 -> 0.000 20.911 94.343 40.123 34.012 305.471 372.831 150.012 68.217 131.583 657.489 575.565 742.622 1117.466 439.937 ... 5643.359 6841.265 293.441 3264.109 2945.036 5677.997 3732.846 4721.548 7434.687 196.697 4681.785 1093.296 1442.105 3492.534 7013.545 + 88 -> 0.000 25.342 133.381 82.910 332.077 173.668 422.138 514.408 554.212 430.205 810.682 572.664 840.751 982.747 377.115 ... 2505.831 1735.069 5085.546 6239.398 15.014 3472.400 6212.248 190.067 4196.619 4808.894 4986.510 3893.319 5391.448 4941.816 2333.632 + 89 -> 0.000 57.667 164.086 21.792 135.157 80.036 491.708 316.695 278.505 153.091 264.112 262.547 434.116 918.655 271.062 ... 6730.465 6188.537 6948.444 2916.550 2282.292 3612.986 4299.206 6133.302 2499.048 5055.278 8098.833 5328.177 7017.662 6406.702 4653.487 + 90 -> 0.000 57.696 90.706 257.853 60.762 107.656 313.884 69.582 26.630 52.496 638.013 810.969 13.808 77.701 988.353 ... 5602.842 183.958 1005.078 3279.931 25.988 1512.070 7080.854 1228.568 3129.116 3926.970 2268.851 1590.904 3722.962 7587.112 1147.959 + 91 -> 0.000 7.194 25.725 55.973 136.325 272.049 183.699 190.744 45.324 400.715 461.149 237.234 227.457 956.547 1250.416 ... 5750.600 5195.454 338.658 217.351 5709.195 5744.160 5244.375 6165.506 5148.552 5653.679 2025.197 7827.562 3711.028 8221.018 5210.631 + 92 -> 0.000 16.316 18.988 45.937 36.557 16.693 551.776 487.803 608.113 827.936 105.717 965.658 620.135 1080.083 594.109 ... 7279.823 3033.580 4129.001 1125.713 3118.908 6007.869 7618.297 8244.613 4618.580 4940.244 7683.478 5787.929 4239.315 7515.542 7348.586 + 93 -> 0.000 90.494 38.262 38.215 358.976 42.608 314.170 399.376 109.054 817.181 97.519 307.903 702.925 1045.147 402.679 ... 2798.868 2809.466 162.900 5956.140 789.608 7303.674 3996.364 8541.878 6066.736 7306.379 5101.265 8213.958 7751.730 8010.192 4472.806 + 94 -> 0.000 73.798 9.671 227.695 54.216 458.690 558.747 388.078 508.382 657.524 770.807 224.193 1114.785 1212.846 1119.382 ... 4140.978 386.735 7922.451 3623.586 1008.386 5196.351 4615.186 4130.571 7507.452 6277.388 169.601 6402.340 8985.614 8135.705 4531.890 + 95 -> 0.000 93.150 30.141 180.208 83.045 387.100 250.980 509.888 290.869 315.783 645.062 210.198 457.477 447.338 766.976 ... 7960.489 6085.569 4954.773 3795.198 4322.706 5524.015 3729.493 1181.202 3027.043 3526.940 4784.044 190.829 6917.789 6213.412 1154.812 + 96 -> 0.000 89.984 55.889 76.809 277.112 40.456 207.985 281.524 662.676 247.922 271.158 969.988 169.134 1044.289 600.528 ... 7797.409 6.056 646.073 5182.352 4856.829 1632.947 5694.009 3941.509 8126.620 1438.446 4944.268 6529.732 7587.947 2997.643 8931.945 + 97 -> 0.000 29.113 98.432 241.058 119.992 484.366 550.355 154.677 357.822 262.762 529.444 651.399 1040.328 322.286 1009.843 ... 1516.961 7299.605 7050.671 4207.465 7573.702 1025.514 1412.649 5393.216 2002.291 4547.475 6371.506 1402.909 3799.099 5236.658 5699.003 + 98 -> 0.000 0.856 85.982 138.055 329.857 341.346 562.946 12.474 425.633 120.145 715.950 938.459 99.861 828.154 1255.346 ... 4238.059 7536.498 4556.223 4890.874 3096.930 503.061 8510.020 909.925 8394.635 5107.284 4145.574 5300.112 8946.610 5619.715 8810.497 + 99 -> 0.000 59.070 74.229 59.814 90.515 478.340 28.036 347.503 492.858 304.780 489.473 928.537 993.152 717.310 503.962 ... 6259.917 2828.528 8545.715 2231.671 3463.213 8191.683 553.990 4689.324 779.949 1782.211 2840.371 4116.932 1877.515 163.961 6333.645 Matrix of 100 rows x 100 columns \ No newline at end of file diff --git a/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat1NoInfo.txt b/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat1NoInfo.txt new file mode 100644 index 00000000..b58433de --- /dev/null +++ b/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat1NoInfo.txt @@ -0,0 +1,12 @@ + 0 1 2 3 4 5 6 7 8 9 + + 0 -> 00 01 02 03 04 05 06 07 08 09 + 1 -> 10 11 12 13 14 15 16 17 18 19 + 2 -> 20 21 22 23 24 25 26 27 28 29 + 3 -> 30 31 32 33 34 35 36 37 38 39 + 4 -> 40 41 42 43 44 45 46 47 48 49 + 5 -> 50 51 52 53 54 55 56 57 58 59 + 6 -> 60 61 62 63 64 65 66 67 68 69 + 7 -> 70 71 72 73 74 75 76 77 78 79 + 8 -> 80 81 82 83 84 85 86 87 88 89 + 9 -> 90 91 92 93 94 95 96 97 98 99 diff --git a/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat1WithInfo.txt b/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat1WithInfo.txt new file mode 100644 index 00000000..76eb0da5 --- /dev/null +++ b/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat1WithInfo.txt @@ -0,0 +1,14 @@ + 0 1 2 3 4 5 6 7 8 9 + + 0 -> 00 01 02 03 04 05 06 07 08 09 + 1 -> 10 11 12 13 14 15 16 17 18 19 + 2 -> 20 21 22 23 24 25 26 27 28 29 + 3 -> 30 31 32 33 34 35 36 37 38 39 + 4 -> 40 41 42 43 44 45 46 47 48 49 + 5 -> 50 51 52 53 54 55 56 57 58 59 + 6 -> 60 61 62 63 64 65 66 67 68 69 + 7 -> 70 71 72 73 74 75 76 77 78 79 + 8 -> 80 81 82 83 84 85 86 87 88 89 + 9 -> 90 91 92 93 94 95 96 97 98 99 + +Matrix of 10 rows x 10 columns \ No newline at end of file diff --git a/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat2NoInfo.txt b/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat2NoInfo.txt new file mode 100644 index 00000000..beb5ffa8 --- /dev/null +++ b/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat2NoInfo.txt @@ -0,0 +1,12 @@ + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 + + 0 -> 00 01 02 03 04 05 06 07 08 09 010 011 012 013 014 ... 085 086 087 088 089 090 091 092 093 094 095 096 097 098 099 + 1 -> 10 11 12 13 14 15 16 17 18 19 110 111 112 113 114 ... 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 + 2 -> 20 21 22 23 24 25 26 27 28 29 210 211 212 213 214 ... 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 + 3 -> 30 31 32 33 34 35 36 37 38 39 310 311 312 313 314 ... 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 + 4 -> 40 41 42 43 44 45 46 47 48 49 410 411 412 413 414 ... 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 + 5 -> 50 51 52 53 54 55 56 57 58 59 510 511 512 513 514 ... 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 + 6 -> 60 61 62 63 64 65 66 67 68 69 610 611 612 613 614 ... 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 + 7 -> 70 71 72 73 74 75 76 77 78 79 710 711 712 713 714 ... 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 + 8 -> 80 81 82 83 84 85 86 87 88 89 810 811 812 813 814 ... 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 + 9 -> 90 91 92 93 94 95 96 97 98 99 910 911 912 913 914 ... 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 diff --git a/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat2WithInfo.txt b/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat2WithInfo.txt new file mode 100644 index 00000000..3dfa4127 --- /dev/null +++ b/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat2WithInfo.txt @@ -0,0 +1,14 @@ + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 + + 0 -> 00 01 02 03 04 05 06 07 08 09 010 011 012 013 014 ... 085 086 087 088 089 090 091 092 093 094 095 096 097 098 099 + 1 -> 10 11 12 13 14 15 16 17 18 19 110 111 112 113 114 ... 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 + 2 -> 20 21 22 23 24 25 26 27 28 29 210 211 212 213 214 ... 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 + 3 -> 30 31 32 33 34 35 36 37 38 39 310 311 312 313 314 ... 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 + 4 -> 40 41 42 43 44 45 46 47 48 49 410 411 412 413 414 ... 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 + 5 -> 50 51 52 53 54 55 56 57 58 59 510 511 512 513 514 ... 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 + 6 -> 60 61 62 63 64 65 66 67 68 69 610 611 612 613 614 ... 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 + 7 -> 70 71 72 73 74 75 76 77 78 79 710 711 712 713 714 ... 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 + 8 -> 80 81 82 83 84 85 86 87 88 89 810 811 812 813 814 ... 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 + 9 -> 90 91 92 93 94 95 96 97 98 99 910 911 912 913 914 ... 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 + +Matrix of 10 rows x 100 columns \ No newline at end of file diff --git a/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat3NoInfo.txt b/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat3NoInfo.txt new file mode 100644 index 00000000..c68b7052 --- /dev/null +++ b/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat3NoInfo.txt @@ -0,0 +1,33 @@ + 0 1 2 3 4 5 6 7 8 9 + + 0 -> 00 01 02 03 04 05 06 07 08 09 + 1 -> 10 11 12 13 14 15 16 17 18 19 + 2 -> 20 21 22 23 24 25 26 27 28 29 + 3 -> 30 31 32 33 34 35 36 37 38 39 + 4 -> 40 41 42 43 44 45 46 47 48 49 + 5 -> 50 51 52 53 54 55 56 57 58 59 + 6 -> 60 61 62 63 64 65 66 67 68 69 + 7 -> 70 71 72 73 74 75 76 77 78 79 + 8 -> 80 81 82 83 84 85 86 87 88 89 + 9 -> 90 91 92 93 94 95 96 97 98 99 + 10 -> 100 101 102 103 104 105 106 107 108 109 + 11 -> 110 111 112 113 114 115 116 117 118 119 + 12 -> 120 121 122 123 124 125 126 127 128 129 + 13 -> 130 131 132 133 134 135 136 137 138 139 + 14 -> 140 141 142 143 144 145 146 147 148 149 + : ... ... ... ... ... ... ... ... ... ... + 85 -> 850 851 852 853 854 855 856 857 858 859 + 86 -> 860 861 862 863 864 865 866 867 868 869 + 87 -> 870 871 872 873 874 875 876 877 878 879 + 88 -> 880 881 882 883 884 885 886 887 888 889 + 89 -> 890 891 892 893 894 895 896 897 898 899 + 90 -> 900 901 902 903 904 905 906 907 908 909 + 91 -> 910 911 912 913 914 915 916 917 918 919 + 92 -> 920 921 922 923 924 925 926 927 928 929 + 93 -> 930 931 932 933 934 935 936 937 938 939 + 94 -> 940 941 942 943 944 945 946 947 948 949 + 95 -> 950 951 952 953 954 955 956 957 958 959 + 96 -> 960 961 962 963 964 965 966 967 968 969 + 97 -> 970 971 972 973 974 975 976 977 978 979 + 98 -> 980 981 982 983 984 985 986 987 988 989 + 99 -> 990 991 992 993 994 995 996 997 998 999 diff --git a/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat3WithInfo.txt b/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat3WithInfo.txt new file mode 100644 index 00000000..38362c00 --- /dev/null +++ b/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat3WithInfo.txt @@ -0,0 +1,35 @@ + 0 1 2 3 4 5 6 7 8 9 + + 0 -> 00 01 02 03 04 05 06 07 08 09 + 1 -> 10 11 12 13 14 15 16 17 18 19 + 2 -> 20 21 22 23 24 25 26 27 28 29 + 3 -> 30 31 32 33 34 35 36 37 38 39 + 4 -> 40 41 42 43 44 45 46 47 48 49 + 5 -> 50 51 52 53 54 55 56 57 58 59 + 6 -> 60 61 62 63 64 65 66 67 68 69 + 7 -> 70 71 72 73 74 75 76 77 78 79 + 8 -> 80 81 82 83 84 85 86 87 88 89 + 9 -> 90 91 92 93 94 95 96 97 98 99 + 10 -> 100 101 102 103 104 105 106 107 108 109 + 11 -> 110 111 112 113 114 115 116 117 118 119 + 12 -> 120 121 122 123 124 125 126 127 128 129 + 13 -> 130 131 132 133 134 135 136 137 138 139 + 14 -> 140 141 142 143 144 145 146 147 148 149 + : ... ... ... ... ... ... ... ... ... ... + 85 -> 850 851 852 853 854 855 856 857 858 859 + 86 -> 860 861 862 863 864 865 866 867 868 869 + 87 -> 870 871 872 873 874 875 876 877 878 879 + 88 -> 880 881 882 883 884 885 886 887 888 889 + 89 -> 890 891 892 893 894 895 896 897 898 899 + 90 -> 900 901 902 903 904 905 906 907 908 909 + 91 -> 910 911 912 913 914 915 916 917 918 919 + 92 -> 920 921 922 923 924 925 926 927 928 929 + 93 -> 930 931 932 933 934 935 936 937 938 939 + 94 -> 940 941 942 943 944 945 946 947 948 949 + 95 -> 950 951 952 953 954 955 956 957 958 959 + 96 -> 960 961 962 963 964 965 966 967 968 969 + 97 -> 970 971 972 973 974 975 976 977 978 979 + 98 -> 980 981 982 983 984 985 986 987 988 989 + 99 -> 990 991 992 993 994 995 996 997 998 999 + +Matrix of 100 rows x 10 columns \ No newline at end of file diff --git a/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat4NoInfo.txt b/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat4NoInfo.txt new file mode 100644 index 00000000..8a1bf0b0 --- /dev/null +++ b/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat4NoInfo.txt @@ -0,0 +1,33 @@ + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 + + 0 -> 00 01 02 03 04 05 06 07 08 09 010 011 012 013 014 ... 085 086 087 088 089 090 091 092 093 094 095 096 097 098 099 + 1 -> 10 11 12 13 14 15 16 17 18 19 110 111 112 113 114 ... 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 + 2 -> 20 21 22 23 24 25 26 27 28 29 210 211 212 213 214 ... 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 + 3 -> 30 31 32 33 34 35 36 37 38 39 310 311 312 313 314 ... 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 + 4 -> 40 41 42 43 44 45 46 47 48 49 410 411 412 413 414 ... 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 + 5 -> 50 51 52 53 54 55 56 57 58 59 510 511 512 513 514 ... 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 + 6 -> 60 61 62 63 64 65 66 67 68 69 610 611 612 613 614 ... 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 + 7 -> 70 71 72 73 74 75 76 77 78 79 710 711 712 713 714 ... 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 + 8 -> 80 81 82 83 84 85 86 87 88 89 810 811 812 813 814 ... 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 + 9 -> 90 91 92 93 94 95 96 97 98 99 910 911 912 913 914 ... 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 + 10 -> 100 101 102 103 104 105 106 107 108 109 1010 1011 1012 1013 1014 ... 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 + 11 -> 110 111 112 113 114 115 116 117 118 119 1110 1111 1112 1113 1114 ... 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 + 12 -> 120 121 122 123 124 125 126 127 128 129 1210 1211 1212 1213 1214 ... 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 + 13 -> 130 131 132 133 134 135 136 137 138 139 1310 1311 1312 1313 1314 ... 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 + 14 -> 140 141 142 143 144 145 146 147 148 149 1410 1411 1412 1413 1414 ... 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 + : ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... + 85 -> 850 851 852 853 854 855 856 857 858 859 8510 8511 8512 8513 8514 ... 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 + 86 -> 860 861 862 863 864 865 866 867 868 869 8610 8611 8612 8613 8614 ... 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 + 87 -> 870 871 872 873 874 875 876 877 878 879 8710 8711 8712 8713 8714 ... 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 + 88 -> 880 881 882 883 884 885 886 887 888 889 8810 8811 8812 8813 8814 ... 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 + 89 -> 890 891 892 893 894 895 896 897 898 899 8910 8911 8912 8913 8914 ... 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 + 90 -> 900 901 902 903 904 905 906 907 908 909 9010 9011 9012 9013 9014 ... 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 + 91 -> 910 911 912 913 914 915 916 917 918 919 9110 9111 9112 9113 9114 ... 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 + 92 -> 920 921 922 923 924 925 926 927 928 929 9210 9211 9212 9213 9214 ... 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 + 93 -> 930 931 932 933 934 935 936 937 938 939 9310 9311 9312 9313 9314 ... 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 + 94 -> 940 941 942 943 944 945 946 947 948 949 9410 9411 9412 9413 9414 ... 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 + 95 -> 950 951 952 953 954 955 956 957 958 959 9510 9511 9512 9513 9514 ... 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 + 96 -> 960 961 962 963 964 965 966 967 968 969 9610 9611 9612 9613 9614 ... 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 + 97 -> 970 971 972 973 974 975 976 977 978 979 9710 9711 9712 9713 9714 ... 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 + 98 -> 980 981 982 983 984 985 986 987 988 989 9810 9811 9812 9813 9814 ... 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 + 99 -> 990 991 992 993 994 995 996 997 998 999 9910 9911 9912 9913 9914 ... 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 diff --git a/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat4WithInfo.txt b/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat4WithInfo.txt new file mode 100644 index 00000000..befffc1e --- /dev/null +++ b/tests/FSharp.Stats.Tests/data/DenseMatrixIntFormat4WithInfo.txt @@ -0,0 +1,35 @@ + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 + + 0 -> 00 01 02 03 04 05 06 07 08 09 010 011 012 013 014 ... 085 086 087 088 089 090 091 092 093 094 095 096 097 098 099 + 1 -> 10 11 12 13 14 15 16 17 18 19 110 111 112 113 114 ... 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 + 2 -> 20 21 22 23 24 25 26 27 28 29 210 211 212 213 214 ... 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 + 3 -> 30 31 32 33 34 35 36 37 38 39 310 311 312 313 314 ... 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 + 4 -> 40 41 42 43 44 45 46 47 48 49 410 411 412 413 414 ... 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 + 5 -> 50 51 52 53 54 55 56 57 58 59 510 511 512 513 514 ... 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 + 6 -> 60 61 62 63 64 65 66 67 68 69 610 611 612 613 614 ... 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 + 7 -> 70 71 72 73 74 75 76 77 78 79 710 711 712 713 714 ... 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 + 8 -> 80 81 82 83 84 85 86 87 88 89 810 811 812 813 814 ... 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 + 9 -> 90 91 92 93 94 95 96 97 98 99 910 911 912 913 914 ... 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 + 10 -> 100 101 102 103 104 105 106 107 108 109 1010 1011 1012 1013 1014 ... 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 + 11 -> 110 111 112 113 114 115 116 117 118 119 1110 1111 1112 1113 1114 ... 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 + 12 -> 120 121 122 123 124 125 126 127 128 129 1210 1211 1212 1213 1214 ... 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 + 13 -> 130 131 132 133 134 135 136 137 138 139 1310 1311 1312 1313 1314 ... 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 + 14 -> 140 141 142 143 144 145 146 147 148 149 1410 1411 1412 1413 1414 ... 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 + : ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... + 85 -> 850 851 852 853 854 855 856 857 858 859 8510 8511 8512 8513 8514 ... 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 + 86 -> 860 861 862 863 864 865 866 867 868 869 8610 8611 8612 8613 8614 ... 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 + 87 -> 870 871 872 873 874 875 876 877 878 879 8710 8711 8712 8713 8714 ... 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 + 88 -> 880 881 882 883 884 885 886 887 888 889 8810 8811 8812 8813 8814 ... 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 + 89 -> 890 891 892 893 894 895 896 897 898 899 8910 8911 8912 8913 8914 ... 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 + 90 -> 900 901 902 903 904 905 906 907 908 909 9010 9011 9012 9013 9014 ... 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 + 91 -> 910 911 912 913 914 915 916 917 918 919 9110 9111 9112 9113 9114 ... 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 + 92 -> 920 921 922 923 924 925 926 927 928 929 9210 9211 9212 9213 9214 ... 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 + 93 -> 930 931 932 933 934 935 936 937 938 939 9310 9311 9312 9313 9314 ... 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 + 94 -> 940 941 942 943 944 945 946 947 948 949 9410 9411 9412 9413 9414 ... 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 + 95 -> 950 951 952 953 954 955 956 957 958 959 9510 9511 9512 9513 9514 ... 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 + 96 -> 960 961 962 963 964 965 966 967 968 969 9610 9611 9612 9613 9614 ... 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 + 97 -> 970 971 972 973 974 975 976 977 978 979 9710 9711 9712 9713 9714 ... 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 9799 + 98 -> 980 981 982 983 984 985 986 987 988 989 9810 9811 9812 9813 9814 ... 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 + 99 -> 990 991 992 993 994 995 996 997 998 999 9910 9911 9912 9913 9914 ... 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 + +Matrix of 100 rows x 100 columns \ No newline at end of file diff --git a/tests/FSharp.Stats.Tests/data/New Text Document.txt b/tests/FSharp.Stats.Tests/data/New Text Document.txt new file mode 100644 index 00000000..e69de29b