The $f$-structure induced on submanifolds of complex and almost complex spaces