  We begin this chapter by introducing the simple algebraic structure of cyclic
codes over finite fields. This structure undergoes a series of generalizations
to present algebraic descriptions of constacyclic, quasi-cyclic (QC),
quasi-twisted (QT), generalized quasi-cyclic (GQC), and multi-twisted (MT)
codes. The correspondence between these codes and submodules of the free
$\mathbb{F}_q[x]$-module $\left(\mathbb{F}_q[x]\right)^\ell$ is established.
Thus, any of these codes corresponds to a free linear code over the principal
ideal domain (PID) $\mathbb{F}_q[x]$. A basis of this code exists and is used
to build a generator matrix with polynomial entries, called the generator
polynomial matrix (GPM). The Hermite normal form of matrices over PIDs is
exploited to achieve the reduced GPMs of MT codes. Some properties of the
reduced GPM are introduced, for example, the identical equation. A formula for
a GPM of the dual code $\mathcal{C}^\perp$ of a MT code is given. At this
point, special attention is paid to QC codes. For a QC code $\mathcal{C}$, we
define its reversed code $\mathcal{R}$. We call $\mathcal{C}$ reversible or
self-dual if $\mathcal{R}=\mathcal{C}$ or $\mathcal{C}^\perp=\mathcal{C}$,
respectively. A formula for a GPM of $\mathcal{R}$ is given. We characterize
GPMs for QC codes that combine reversibility and
self-duality/self-orthogonality. For the reader interested in running computer
search for optimal codes, we show the existence of binary self-orthogonal
reversible QC codes that have the best known parameters as linear codes. These
results can be obtained by brute-force search using GPMs that meet the above
characterization.
