-- | Create uniform mesh
uniformMeshN :: Double  -- ^ Lower bound
             -> Double  -- ^ Mesh step
             -> Int     -- ^ Number of points
             -> UniformMesh
uniformMeshN a dx n
  | n  <  2   = error "Numeric.Tool.Interpolation.Mesh.uniformMeshStep: too few points"
  | dx <= 0   = error "Numeric.Tool.Interpolation.Mesh.uniformMeshStep: nonpositive step"
  | otherwise = UniformMesh a dx n
uniformMeshN :: Double  -- ^ Lower bound
             -> Double  -- ^ Mesh step
             -> Int     -- ^ Number of points
             -> UniformMesh
uniformMeshN a dx n
  | n  <  2   = error "Numeric.Tool.Interpolation.Mesh.uniformMeshStep: too few points"
  | dx <= 0   = error "Numeric.Tool.Interpolation.Mesh.uniformMeshStep: nonpositive step"
  | otherwise = UniformMesh a dx n
uniformMeshN a dx n
  | n  <  2   = error "Numeric.Tool.Interpolation.Mesh.uniformMeshStep: too few points"
  | dx <= 0   = error "Numeric.Tool.Interpolation.Mesh.uniformMeshStep: nonpositive step"
  | otherwise = UniformMesh a dx n