[lab2] Cleanup

This commit is contained in:
Andrew Golovashevich 2026-01-30 03:02:49 +03:00
parent 8ae7321cd9
commit 762238d55c
2 changed files with 6 additions and 10 deletions

View File

@ -1,5 +1,5 @@
use std::cmp::min; use std::cmp::min;
use std::ops::{BitAnd, BitAndAssign, Index, IndexMut, Not, Shl}; use std::ops::{BitAnd, BitAndAssign, Index, IndexMut};
pub struct BitVector { pub struct BitVector {
data: Box<[bool]>, data: Box<[bool]>,

View File

@ -4,10 +4,9 @@ mod algo;
use crate::algo::BitVector; use crate::algo::BitVector;
use eframe::egui; use eframe::egui;
use eframe::egui::{Align, Button, Ui}; use eframe::egui::Ui;
use eframe::emath::Numeric; use eframe::emath::Numeric;
use egui_extras::{Column, TableBuilder}; use egui_extras::{Column, TableBuilder};
use rand::SeedableRng;
use std::ops::RangeInclusive; use std::ops::RangeInclusive;
fn main() -> eframe::Result { fn main() -> eframe::Result {
@ -16,7 +15,7 @@ fn main() -> eframe::Result {
..Default::default() ..Default::default()
}; };
eframe::run_native( eframe::run_native(
"Annealing Simulation for Chess Queens Task", "Adaptive Resonance Theory calculater",
options, options,
Box::new(|_cc| Ok(Box::<MyApp>::default())), Box::new(|_cc| Ok(Box::<MyApp>::default())),
) )
@ -158,15 +157,12 @@ impl eframe::App for MyApp {
ui.label(""); ui.label("");
let mut tableBuilder = TableBuilder::new(ui) TableBuilder::new(ui)
.striped(true) // Alternating row colors .striped(true) // Alternating row colors
.resizable(true) .resizable(true)
.column(Column::remainder()) .column(Column::remainder())
.column(Column::remainder()); .column(Column::remainder())
for _ in 0..self.bitCount { .columns(Column::auto(), self.bitCount)
tableBuilder = tableBuilder.column(Column::auto());
}
tableBuilder
.header(20.0, |mut header| { .header(20.0, |mut header| {
header.col(|ui| { header.col(|ui| {
ui.horizontal(|ui| { ui.horizontal(|ui| {