A unified theory for the computer aided analysis of general switched capacitor networks