Linear Quadratic Optimal Control of Time-Invariant Linear Networks With Selectable Input Matrix