redimSize

  1. coord_t[] redimSize(size_t K, size_t N, in A[] size)
    coord_t[]
    redimSize
    pure
    (
    A
    )
    (
    size_t K
    ,
    size_t N
    ,
    in A[] size
    )
    if (
    isIntegral!A
    )
    in { assert (K >= N); assert (isAllCompPositive(size)); }
  2. coord_t[] redimSize(size_t N, in A[] size)

Examples

1 assertEq( [1,2,3], redimSize( 3, 3, [1,2,3] ) );
2 assertEq( [1,6,1], redimSize( 3, 2, [1,2,3] ) );
3 assertEq( [5,6,1], redimSize( 3, 2, [5,3,2] ) );
4 assertEq( [5,6], redimSize( 2, 2, [5,3,2] ) );
5 assertEq( [30,1,1,1], redimSize( 4, 1, [5,3,2] ) );

Meta