add cosine.h cosine.cpp