// -*- C++ -*-

// ===== FUNCTIONS declared in auxil2d/copy2d.h: =====

null(Type **f, ulong nr, ulong nc);

fill(Type **f, ulong nr, ulong nc, Type v);

offset_copy(const Type1 **src, ulong nrs, ulong ncs,;
            Type2 **dst, ulong nrd, ulong ncd,
            ulong coff=0,
            ulong roff=0)
// copy (as much data as possible)
// src[i+coff,j+roff] --> dst[i,j]

// ===== FUNCTIONS declared in auxil2d/reverse2d.h: =====

reverse_horiz(Type **f, ulong nr, ulong nc);
// reverse order of rows

reverse_vert(Type **f, ulong nr, ulong nc);
// reverse order of rows

// ===== FUNCTIONS declared in auxil2d/rotate2d.h: =====

rotate_up(Type **f, ulong nr, ulong nc, ulong s);
// rotate towards row #0

rotate_down(Type **f, ulong nr, ulong nc, ulong s);
// rotate away from row #0

rotate_vert(Type **f, ulong nr, ulong nc, long s);

rotate_left(Type **f, ulong nr, ulong nc, ulong s);
// rotate towards col #0

rotate_right(Type **f, ulong nr, ulong nc, ulong s);
// rotate away from col #0

rotate_horiz(Type **f, ulong nr, ulong nc, long s);

rotate(Type **f, ulong nr, ulong nc, long vert, long horiz);

zero2center(Type **f, ulong nr, ulong nc);
// useful for 2dim FFTs:
// brings zero freq to midpoint

// ===== FUNCTIONS declared in auxil2d/shift2d.h: =====

shift_left(Type **f, ulong nr, ulong nc, ulong s);
// shift towards col #0

shift_right(Type **f, ulong nr, ulong nc, ulong s);
// shift away from col #0

shift_horiz(Type **f, ulong nr, ulong nc, long s);

shift_up(Type **f, ulong nr, ulong nc, ulong s);
// shift towards row #0

shift_down(Type **f, ulong nr, ulong nc, ulong s);
// shift away from row #0

shift_vert(Type **f, ulong nr, ulong nc, long s);

shift(Type **f, ulong nr, ulong nc, long vert, long horiz);

// ===== FUNCTIONS declared in auxil2d/scale2d.h: =====

linear_scale(Type **f, ulong nr, ulong nc,;
             Type nmi, Type nma)   // new min, max
// linear scale so that
//   new_min==nmi,  ne_max==nma

linear_scale(Type **f, ulong nr, ulong nc,;
             Type mi, Type ma,     // old min, max
             Type nmi, Type nma)   // new min, max
// linear scale so that
//   new_min==nmi,  ne_max==nma
// supply (or pretend) old min and max

log_scale(Type **f, ulong nr, ulong nc,;
          double xi, double xa, Type nma)

// ===== FUNCTIONS declared in auxil2d/minmax2d.h: =====

min_max(const Type **f, ulong nr, ulong nc, Type *mi, Type *ma);
// find min and max

// ===== FUNCTIONS declared in auxil2d/transpose.h: =====

transpose(Type **f, ulong nr, ulong nc);
// currently only for nr==nc

// ===== FUNCTIONS declared in auxil2d/misc2d.h: =====

apply_func(Type **f, ulong nr, ulong nc, Type (*func)(Type));
// apply func() on each element

