use crate::seqloc::SeqLoc;
use serde::{Deserialize, Serialize};
#[derive(Clone, Serialize, Deserialize, PartialEq, Debug)]
#[serde(rename_all = "lowercase")]
pub enum SeqGraphChoice {
Real(RealGraph),
Int(IntGraph),
Byte(ByteGraph),
}
#[derive(Clone, Serialize, Deserialize, PartialEq, Debug)]
#[serde(rename_all = "kebab-case")]
pub struct SeqGraph {
pub title: Option<String>,
pub comment: Option<String>,
pub loc: SeqLoc,
pub title_x: Option<String>,
pub title_y: Option<String>,
pub comp: Option<i64>,
pub a: Option<f64>,
pub b: Option<f64>,
pub numval: u64,
pub graph: SeqGraphChoice,
}
#[derive(Clone, Serialize, Deserialize, PartialEq, Debug)]
#[serde(rename_all = "kebab-case")]
pub struct Graph<T> {
pub max: T,
pub min: T,
pub axis: T,
pub values: Vec<T>,
}
pub type RealGraph = Graph<f64>;
pub type IntGraph = Graph<u64>;
pub type ByteGraph = Graph<u8>;