
//#include "comb/auxprint.h"

#include "fxtio.h"
#include "fxtiomanip.h"

//#include "fxtalloca.h"
#include "fxttypes.h"


void
print_vec(const char *bla, const ulong *x, ulong n, bool dfz/*=false*/)
// Print x[0,..,n-1] as vector, n is the number of elements in the set.
// If dfz is true then Dots are printed For Zeros.
{
    if ( bla )  cout << bla;

    cout << "[ ";
    for (ulong k=0; k<n; ++k)
    {
        ulong t = x[k];
        if ( t!=0 )  cout << t;
        else         cout << (dfz?'.':'0');
        if ( k<n-1 )  cout << " ";
    }
    cout << " ]";
}
// -------------------------


void
print_sign_vec(const char *bla, const ulong *x, ulong n)
// Print x[0,..,n-1] as vector of signs
{
    if ( bla )  cout << bla;

    cout << "[ ";
    for (ulong k=0; k<n; ++k)
    {
        cout << (x[k]==1 ? '+':'-');
        if ( k<n-1 )  cout << " ";
    }
    cout << " ]";
}
// -------------------------


static const char sym[]="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";

void
print_sym_vec(const char *bla, const ulong *x, ulong n)
// Print x[0,..,n-1] as vector of symbols where
// symbols are 0,1,..,9, A,B...,Z, a,b,...,z
{
    if ( bla )  cout << bla;

    cout << "[ ";
    for (ulong k=0; k<n; ++k)
    {
        cout << sym[x[k]];
        if ( k<n-1 )  cout << " ";
    }
    cout << " ]";
}
// -------------------------

