elementary-row-operation-verifier 0.0.1

A tool to verify the correctness of elementary row operations on matrices
Documentation
use crate::matrix::Matrix;

/// 操作类型
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum OpKind {
    Row,
    Col,
}

/// 解析后的 .lore 文件
#[derive(Debug, Clone)]
pub struct FileParseResult {
    pub ori: Matrix,
    pub op_kind: OpKind,
    pub steps: Vec<Step>,
}

#[derive(Debug, Clone)]
pub struct Step {
    pub kind: OpKind,
    pub ops: Vec<(usize, String)>,
    pub expected: Matrix,
    /// 列变换:原始操作行切片(用于 TUI 显示 | 链)
    pub op_slices: Vec<Vec<String>>,
    /// 列宽(字符数)
    pub col_widths: Vec<usize>,
}

/// 原始矩阵块(解析中)
#[derive(Debug, Clone)]
pub struct RawBlock {
    /// 数值行
    pub rows: Vec<Vec<f64>>,
    /// 操作文本(按行或按列)
    pub ops: Vec<String>,
    /// 列变换:每操作行按列切割的文本
    pub op_slices: Vec<Vec<String>>,
    /// 列宽(字符数)
    pub col_widths: Vec<usize>,
}