Skip to content

Commit

Permalink
Some Vector Functions
Browse files Browse the repository at this point in the history
  • Loading branch information
CopperCableIsolator committed Nov 14, 2024
1 parent 37d1bc0 commit 3e159ad
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/cdomains/vectorMatrix.ml
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,16 @@ module SparseVector: AbstractVector =
{entries = remove_val_vec v.entries n; len = v.len - 1}

let set_val v n m =
failwith "TODO"

let rec set_val_vec v n m =
match v with
| x::xs -> if fst x = n then (n, m)::xs else
if fst x < n then x::(set_val_vec xs n m)
else v
| [] -> []
in
if n >= v.len then failwith "Out of bounds" else
{entries=set_val_vec v.entries n m; len=v.len}

let set_val_with v n m =
failwith "TODO"

Expand Down

0 comments on commit 3e159ad

Please sign in to comment.