feat(model): add regular_category_names to Model
Updates `Model` to include `regular_category_names` , which returns category names excluding virtual categories (_Index, _Dim). This allows other parts of the application to distinguish between user-defined categories and system-internal ones. Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q5_K_XL)
This commit is contained in:
@ -250,6 +250,15 @@ impl Model {
|
|||||||
self.categories.keys().map(|s| s.as_str()).collect()
|
self.categories.keys().map(|s| s.as_str()).collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Category names excluding virtual categories (_Index, _Dim).
|
||||||
|
pub fn regular_category_names(&self) -> Vec<&str> {
|
||||||
|
self.categories
|
||||||
|
.iter()
|
||||||
|
.filter(|(_, c)| c.kind.is_regular())
|
||||||
|
.map(|(name, _)| name.as_str())
|
||||||
|
.collect()
|
||||||
|
}
|
||||||
|
|
||||||
/// Evaluate a computed value at a given key, considering formulas.
|
/// Evaluate a computed value at a given key, considering formulas.
|
||||||
/// Returns None when the cell is empty (no stored value, no applicable formula).
|
/// Returns None when the cell is empty (no stored value, no applicable formula).
|
||||||
pub fn evaluate(&self, key: &CellKey) -> Option<CellValue> {
|
pub fn evaluate(&self, key: &CellKey) -> Option<CellValue> {
|
||||||
|
|||||||
Reference in New Issue
Block a user