In this paper we present a general framework for solving the stationary
nonlinear Schr\"odinger equation (NLSE) on a network of one-dimensional wires
modelled by a metric graph with suitable matching conditions at the vertices. A
formal solution is given that expresses the wave function and its derivative at
one end of an edge (wire) nonlinearly in terms of the values at the other end.
For the cubic NLSE this nonlinear transfer operation can be expressed
explicitly in terms of Jacobi elliptic functions. Its application reduces the
problem of solving the corresponding set of coupled ordinary nonlinear
differential equations to a finite set of nonlinear algebraic equations. For
sufficiently small amplitudes we use canonical perturbation theory which makes
it possible to extract the leading nonlinear corrections over large distances.Comment: 26 page