<commit_before>use super::*;
use crate::StrError;
use russell_lab::{inverse, mat_mat_mul, mat_vec_mul, Matrix, NormVec, Vector};

/// Defines the class of geometric shape
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
pub enum GeoClass {
    /// Lines (segments) class
    Lin,

    /// Triangles class
    Tri,

    /// Quadrilaterals class
    Qua,

    /// Tetrahedra class
    Tet,

    /// Hexahedra class
    Hex,
}

/// Defines the kind of geometric shape
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
pub enum GeoKind {
    /// Line (segment) with 2 points (linear functions)
    Lin2,

    /// Line (segment) with 3 points (quadratic functions)
    Lin3,

    /// Line (segment) with 4 points (cubic functions)
    Lin4,

    /// Line (segment) with 5 points (quartic functions)
    Lin5,

    /// Triangle with 3 points (linear edges)
    Tri3,

    /// Triangle with 6 points (quadratic edges)
    Tri6,

    /// Triangle with 10 points (cubic edges; interior points)
    Tri10,

    /// Triangle with 15 points (quartic edges; interior points)
    Tri15,

    /// Quadrilateral with 4 points (linear edges)
    Qua4,

    /// Quadrilateral with 8 points (quadratic edges)
    Qua8,

    /// Quadrilateral with 9 points (quadratic edges; interior point)
    Qua9,

    /// Quadrilateral with 12 points (cubic edges)
    Qua12,

    /// Quadrilateral with 16 points (cubic edges; interior points)
    Qua16,

    /// Quadrilateral with 17 points (quartic edges; interior point)
    Qua17,

    /// Tetrahedron with 4 points (linear faces)
    Tet4,

    /// Tetrahedron with 10 points (quadratic faces)
    Tet10,

    /// Hexahedron with 8 points (bilinear faces)
    Hex8,

    /// Hexahedron with 20 points (quadratic faces)
    Hex20,
}

// Defines an alias for interpolation functions
pub type FnInterp = fn(&mut Vector, &[f64]);

// Defines an alias for derivative of interpolation functions<commit_msg>Improve doc<commit_after>use super::*;
use crate::StrError;
use russell_lab::{inverse, mat_mat_mul, mat_vec_mul, Matrix, NormVec, Vector};

/// Defines the class of geometric shape
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
pub enum GeoClass {
    /// Lines (segments) class
    Lin,

    /// Triangles class
    Tri,

    /// Quadrilaterals class
    Qua,

    /// Tetrahedra class
    Tet,

    /// Hexahedra class
    Hex,
}

/// Defines the kind of geometric shape
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
pub enum GeoKind {
    /// Line (segment) with 2 points (linear functions)
    Lin2,

    /// Line (segment) with 3 points (quadratic functions)
    Lin3,

    /// Line (segment) with 4 points (cubic functions)
    Lin4,

    /// Line (segment) with 5 points (quartic functions)
    Lin5,

    /// Triangle with 3 points (linear edges)
    Tri3,

    /// Triangle with 6 points (quadratic edges)
    Tri6,

    /// Triangle with 10 points (cubic edges; interior points)
    Tri10,

    /// Triangle with 15 points (quartic edges; interior points)
    Tri15,

    /// Quadrilateral with 4 points (linear edges)
    Qua4,

    /// Quadrilateral with 8 points (quadratic edges)
    Qua8,

    /// Quadrilateral with 9 points (quadratic edges; interior point)
    Qua9,

    /// Quadrilateral with 12 points (cubic edges)
    Qua12,

    /// Quadrilateral with 16 points (cubic edges; interior points)
    Qua16,

    /// Quadrilateral with 17 points (quartic edges; interior point)
    Qua17,

    /// Tetrahedron with 4 points (linear faces)
    Tet4,

    /// Tetrahedron with 10 points (quadratic faces)
    Tet10,

    /// Hexahedron with 8 points (bilinear faces)
    Hex8,

    /// Hexahedron with 20 points (quadratic faces)
    Hex20,
}

/// Defines an alias for interpolation functions
pub type FnInterp = fn(&mut Vector, &[f64]);

/// Defines an alias for derivative of interpolation functions
{'fraction_non_alphanumeric': 0.10736514522821576, 'fraction_numerical': 0.026970954356846474, 'mean_word_length': 2.5845724907063197, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7107868', 'n_tokens_mistral': 1344, 'n_tokens_neox': 1196, 'n_words': 434}