Functional Networks with Applications