Added outer functions that can be used to implement outer product and other operations.