Buckets

Revision as of 00:41, 12 February 2020 by Devika (talk | contribs) (Created page with "* << Z3 Home * Z3 Language Documentation * Z%5E3_Array_Manipulation_Member_Functions | Listing of Z3 Array Manipulation Member F...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Buckets

  • 1..10.buckets() returns an object with key frequency pairs.
"1": 1,
"2": 1,
"3": 1,
"4": 1,
"5": 1,
"6": 1,
"7": 1,
"8": 1,
"9": 1,
"10": 1,
  • a=1..10.fillwith(1..3).buckets()
"1": 4,
"2": 3,
"3": 3,
  • a=1..10.fillwith(1..3).buckets();

b=FLATTENOBJECT(a);

1 4
2 3
3 3