I have two arrays:
val diceProbDist = new Array[Double](2 * DICE + 1)
and
val diceExpDist = new Array[Double](2 * DICE + 1)
and I want to merge into one structure (maybe some kind of tuple):
(0, 0.0, 0,0)(1, 0.0, 0.0)(2, 0.02778, 0.02878)...
where the first record is the index of the array, the second record is the first value of the array, and the third record is the second value of the array.
Is there any scala function for this (zip with map or something like that)?
thanks ML
source
share