feat(viz): bit manipulation types
This commit is contained in:
@@ -99,6 +99,8 @@ export interface DataState {
|
||||
tries?: TrieState[];
|
||||
// Union-Find support
|
||||
unionFind?: UnionFindState[];
|
||||
// Bit Manipulation support
|
||||
bitManipulation?: BitManipulationState[];
|
||||
}
|
||||
|
||||
/** Single step in the visualization */
|
||||
@@ -382,6 +384,28 @@ export interface TrieState {
|
||||
searchIndex?: number; // Current character index
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// Bit Manipulation Types
|
||||
// ============================================
|
||||
|
||||
/** State of a bit representation display */
|
||||
export interface BitState {
|
||||
id: string;
|
||||
value: number;
|
||||
bits: string; // Binary string like "0010"
|
||||
label?: string;
|
||||
state: 'normal' | 'highlighted' | 'comparing' | 'result' | 'cancelled';
|
||||
}
|
||||
|
||||
/** Complete bit manipulation state */
|
||||
export interface BitManipulationState {
|
||||
id: string;
|
||||
operands: BitState[];
|
||||
operation?: 'XOR' | 'AND' | 'OR' | 'NOT';
|
||||
result?: BitState;
|
||||
label?: string;
|
||||
}
|
||||
|
||||
// ============================================
|
||||
// Union-Find Types
|
||||
// ============================================
|
||||
|
||||
Reference in New Issue
Block a user