Skip to content

Commit

Permalink
refact: refactored simplify logic and adding comments to unit value lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Casper Bollen authored and Casper Bollen committed Sep 2, 2023
1 parent 3c78e94 commit a1e7457
Show file tree
Hide file tree
Showing 4 changed files with 323 additions and 107 deletions.
4 changes: 2 additions & 2 deletions src/Informedica.GenSolver.Lib/Variable.fs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ module Variable =
if vu |> ValueUnit.isEmpty |> not then
vu |> create true
else
vu |> ValueUnit.setZeroNonNegative |> create false
vu |> ValueUnit.setZeroOrPositive |> create false

let fExcl vu =
let vu =
Expand All @@ -286,7 +286,7 @@ module Variable =
if vu |> ValueUnit.isEmpty |> not then
vu |> create false
else
vu |> ValueUnit.setZeroNonNegative |> create false
vu |> ValueUnit.setZeroOrPositive |> create false

apply fIncl fExcl

Expand Down
3 changes: 3 additions & 0 deletions src/Informedica.GenUnits.Lib/Scripts/Api.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ open Informedica.GenUnits.Lib
open Informedica.Utils.Lib.BCL

open Swensen.Unquote
open Tests


Tests.testNumDenom()

// Test Array.removeBigRationalMultiples
let testRemoveBigRationalMultiples () =
let test (act : BigRational[]) (exp : BigRational[]) =
Expand Down
Loading

0 comments on commit a1e7457

Please sign in to comment.