use std::fmt::Display;
use thiserror::Error;
use crate::{math::matrix::MatrixError, FloatNumber};
#[derive(Debug, PartialEq, Error)]
pub enum SlicError<T>
where
T: FloatNumber + Display,
{
#[error("The number of segments must be greater than zero: {0}")]
InvalidSegments(usize),
#[error("Compactness must be greater than zero: {0}")]
InvalidCompactness(T),
#[error("Iterations must be greater than zero: {0}")]
InvalidIterations(usize),
#[error("Tolerance must be greater than zero: {0}")]
InvalidTolerance(T),
#[error("Unexpected pixels length: {0}")]
UnexpectedLength(#[from] MatrixError),
}