  Random networks are intensively used as null models to investigate properties
of complex networks. We describe an efficient and accurate algorithm to
generate arbitrarily two-point correlated undirected random networks without
self- or multiple-edges among vertices. With the goal to systematically
investigate the influence of two-point correlations, we furthermore develop a
formalism to construct a joint degree distribution $P(j,k)$ which allows to fix
an arbitrary degree distribution $P(k)$ and an arbitrary average nearest
neighbor function $\knn(k)$ simultaneously. Using the presented algorithm, this
formalism is demonstrated with scale-free networks ($P(k) \propto k^{-\gamma}$)
and empirical complex networks ($P(k)$ taken from network) as examples.
Finally, we generalize our algorithm to annealed networks which allows networks
to be represented in a mean-field like manner.
