The infimum cosine angle between two finitely generated shift-invariant spaces and its applications