  We derive a spectral interpretation of the pivot operation on a graph and
generalise this operation to hypergraphs. We establish lower bounds on the
number of flat spectra of a Boolean function, depending on internal structures,
with respect to the {I,H}^n and {I,H,N}^n sets of transforms. We also construct
a family of Boolean functions of degree higher than two with a large number of
flat spectra with respect to {I,H}^n, and compute a lower bound on this number.
The relationship between pivot orbits and equivalence classes of
error-correcting codes is then highlighted. Finally, an enumeration of pivot
orbits of various types of graphs is given, and it is shown that the same
technique can be used to classify codes.
