redimSize

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

Examples

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

Meta