Created Discrete2DFunction and Discrete3DFunction