Algorithms For The Closest And Shortest Vector Problems On General Lattices