10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-11-06 22:23:39 +01:00

Order blocks by block_id

This commit is contained in:
Anthony Scemama 2020-06-02 00:19:45 +02:00
parent 89bd9d9c7f
commit 4ad08c8c03

View File

@ -94,6 +94,12 @@ let of_raw_data ?(locked=true) ~range property =
let data = let data =
Block.raw_data ~locked () Block.raw_data ~locked ()
|> List.filter (fun x -> x.Block.property = property) |> List.filter (fun x -> x.Block.property = property)
|> List.sort (fun x y ->
let x = Block_id.to_int x.Block.block_id in
let y = Block_id.to_int y.Block.block_id in
if (x>y) then 1
else if (x<y) then -1
else 0)
in in
let data_in_range rmin rmax = let data_in_range rmin rmax =