\documentclass{kasper}

\usepackage{xspace}
\usepackage{relsize}

\renewcommand\descriptionlabel[1]{\hbox to \textwidth{\quad\quad\bf{#1}\hfill}}

\newcommand{\ytt}{{\tt youngtab++}\xspace}
\newcommand{\Ytt}{{\tt Youngtab++}\xspace}

\begin{document}
\title{\Ytt documentation}
\maketitle
\begin{abstract}
The \ytt library is a small C++ library for the storage and
manipulation of Young tableaux. Filled tableaux are supported with
templates, allowing for any arbitrary object to be stored in the
boxes that make up the tableaux. Several algorithms are included, among
which an implementation of the Littlewood-Richardson algorithm for
tensor products. Also included are pretty-print output functions
acting on standard streams.
\end{abstract}
\begin{sectionunit}
\title{Overview}
\maketitle

There are two tableau classes, one for tableaux without any
information in the boxes and one for so-called filled tableaux. The
latter are used just like STL containers. Two simple examples show the
differences in initialisation. Unfilled tableaux only need to know
about the row lengths and are therefore very quick to construct:
\begin{screen}
tableau tab;
tab.add_row(3);
tab.add_row(2);
tab.add_row(2);
\end{screen}
Filled tableaux need to know about the content of each and every box:
\begin{screen}
filled_tableau<std::string> ftab;
ftab.add_box(0,''a'');
ftab.add_box(0,''b'');
ftab.add_box(0,''c'');
ftab.add_box(1,''d'');
ftab.add_box(1,''e'');
ftab.add_box(2,''f'');
ftab.add_box(2,''g'');
\end{screen}

There are many algorithms which do not act on a single tableau, but
rather on a collection of them. There are special tableau containers
to store such collections. For unfilled tableaux the canonical example is
\begin{screen}
tableaux<tableau> tabs;
tableau tab1, tab2;
tabs.add_tableau(tab1);
tabs.add_tableau(tab2);
\end{screen}
For filled tableaux, the container is templated over the tableau type
(not over the data type stored in the boxes):
\begin{screen}
tableaux<filled_tableau<std::string> > ftabs;
filled_tableau<std::string> ftab1, ftab2;
ftabs.add_tableau(ftab1);
ftabs.add_tableau(ftab2);
\end{screen}
The tableaux added in this way are stored by value (just like in STL
containers). 

\begin{sectionunit}
\title{Tensor products}
\maketitle

The Littlewood-Richardson algorithm is implemented in two forms. The
first one just takes two single tableaux and multiplies them,
\begin{screen}
tableau tab1,tab2;
tableaux prod;
LR_tensor(tab1, tab2, 10, prod.get_back_insert_iterator());
\end{screen}
The ``10'' in the third argument indicates the maximum number of rows
that is allowed. Observe that you give this algorithm an insert
iterator to handle the storage of the tableaux in the product. In this
way, it becomes independent of what you actually do with the tableaux
in the product (you can store them, as in the example above, but you
can also output them with an output iterator).

In the second form, the Littlewood-Richardson algorithm takes a
tableau container and a single tableau:
\begin{screen}
tableau tab1;
tableaux tabs1, prod;
LR_tensor(tabs1, tab1, 10, prod.get_back_insert_iterator());
\end{screen}
The logic is the same, but now applied to a sum of representations as
the first argument.

\end{sectionunit}

\begin{sectionunit}
\title{Projectors}
\maketitle

\begin{screen}
filled_tableau<std::string> tab;
tab.add_box(0, ``a'');
tab.add_box(0, ``b'');
tab.add_box(1, ``c'');
symmetriser<std::string> sym;
tab.projector(sym);
cout << sym << std::endl;
\end{screen}
This leads to
\begin{screen}
a b c   1
b a c   1
c b a  -1
b c a  -1
\end{screen}

\end{sectionunit}

\begin{sectionunit}
\title{Canonicalisation and straightening}
\maketitle

Tableaux can be brought into canonical form by using anti-symmetry in
sorting of the columns and symmetry under interchange of identical
columns. For example,
\begin{screen}
filled_tableau<int> tab;
tab.add_box(0,4);
tab.add_box(0,1);
tab.add_box(1,3);
tab.add_box(1,2);
cout << tab << std::endl;
tab.canonicalise();
cout << tab << std::endl;
\end{screen}
leads to the output
\begin{screen}
4 1   
3 2

1 3  (-1)
2 4
\end{screen}
This was obtained by first sorting, using anti-symmetry, within the
columns, and then sorting, using symmetry, the identical columns.

Straightening of a tableau is canonicalisation plus a rewriting in
terms of standard tableaux using Garnir symmetries. 

\end{sectionunit}

\begin{description}
\item[{\tt hook\_length(unsigned int row, unsigned int col)}]
Compute the hook length of the hook with corner in the indicated box.
\item[{\tt hook\_length\_prod}] 
Compute the product of all the hook lengths, giving the ``dimension'' of 
the tableau.
\end{description}

\end{sectionunit}
\end{document}
