  We develop an algorithm for computing the weight distribution of a linear
$[n,k]$ code over a finite field $\mathbb{F}_q$. We represent the codes by
their characteristic vector with respect to a given generator matrix and a
special type of a generator matrix of the k-dimensional simplex code. This
characteristic vector is the input data of our algorithms. The complexity of
the presented algorithms is O(kq^k).
