"The only two kinds of comments that are acceptable for completed
code are intent and summary comments."

"A good name for a routine clearly describes everything the routine does."

------------------------------------------------------------------------

TO DO list, in no particular order:

- P::logverbose to enable interesting options (but not all!)

- change non-critical errors into warnings! (is this a good idea?
make it run-time configurable. exitonnoncriticalerror=true as default)

- proper handling of scripts (first line), script comments, uniformisation

- WARNING: ISO2LR currently broken

- make a class containing global data (dg, diag, etc.)

- unit testing withing the NRG Lj source tree. Use #defines etc.

- input-modify-output order of parameters

- store dg in (QSi)(r) subspaces, instead of sending around qsrmax
   -> better yet: make an abstraction for holding subspaces, dimensions
    (before/after truncation), etc. (Subspaces!)
      dim != nr != nrtrunc.
    >> MERGE Rmaxvals and ancestors, for starters! Name it Subspace,
       accessed by Subspace[I].ancestors, Subspace[I].offset, Subspace[I].dim, etc.

- FOREACH_subspace() [related to previous]

- better data hiding (encapsulation)

- functions which do not depend on parameters and global variables
   should be factored out to separate .cc files [especially if they also do not
   depend on the symmetry type!!]

- remove any offset 1 arithmetics [this could lead to bugs, so what to do?]

- study parallelization. Are there places where we should parallelize
 inner loops?

- if the program exits unexpectedly (i.e. due to an assertion
 error, a signal, etc.), 'unitary' files should also be deleted.
 Add an "exception" handler !!

- impurity operator sequence {d,a,b,c,e}. Fix it!

- consider the possibility of having a single input file (merged param
   and data) and a single output file (all currently written files),
   and using stdin/stdout. 
   In some environments this might be a better approach!
   - Write a corresponding wrapper library.
   - Write scripts to compose/decompose input and output...
   - XML ??

- make XYFUNC a class with interpolation and other things one might need in a 
   tabulated representation of a function

- doxygen documentation

- adding/subtracting 1 for U(1) symmetry is quite confusing and certainly
 unnecessary. Fix it! (and don't forget to modify initial.m as well)...
 
- perform (temp files) cleanup in case of abortion due to some error.

