Direct, prediction- and smoothing-based Kalman and particle filter algorithms