mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2024-12-21 11:53:30 +01:00
Order blocks by block_id
This commit is contained in:
parent
89bd9d9c7f
commit
4ad08c8c03
@ -94,6 +94,12 @@ let of_raw_data ?(locked=true) ~range property =
|
||||
let data =
|
||||
Block.raw_data ~locked ()
|
||||
|> 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
|
||||
|
||||
let data_in_range rmin rmax =
|
||||
|
Loading…
Reference in New Issue
Block a user