Changes between Version 4 and Version 5 of DataParallel/Regular
 Timestamp:
 May 13, 2009 8:12:46 AM (7 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

DataParallel/Regular
v4 v5 54 54 === Creating Arrays === 55 55 56 A new array s can be created from flat parallel arrays56 A new array can be created from a flat parallel array 57 57 {{{ 58 58 fromNArray:: U.Elt r => U.Array r > Array DIM1 r 59 59 }}} 60 '''SLPJ: what is U? What is U.Array?''' 60 61 and from scalar values: 61 62 {{{ … … 67 68 bpermuteR:: Array dim e > Shape dim' > (Shape dim' > Shape dim) > Array dim' 68 69 }}} 69 For example, transposition of a two dimensional array can be defined in terms of mkArray as follows: 70 '''SLPJ: I'd call it `reshape` like APL.''' 71 For example, transposition of a two dimensional array can be defined in terms of mkArray as follows '''SLPJ: in terms of `bpermuteR` perhaps?''': 70 72 {{{ 71 73 transpose:: Array DIM2 a > Array DIM2 a … … 73 75 where (n,m) = shape arr 74 76 }}} 77 '''SLPJ: presumably `shape :: Array dim a > Shape dim`?'''. 75 78 Or cutting a 3 x 3 tile starting at indices (0,0) out of a two dimensional matrix: 76 79 {{{