import { Graph } from '../../../algorithms/graph/graph.js'; import { Edge, Node } from '../../../algorithms/types/graph.js'; import { GraphFeatures } from '../classification/feature-extractor.js'; import { GraphClass, TrainedClassifier } from '../classification/graph-classifier.js'; /** * Configuration for constrained graph generation. */ export interface ConstrainedGeneratorConfig { /** Minimum node count for generated graphs (default: 30) */ minNodes?: number; /** Maximum node count for generated graphs (default: 100) */ maxNodes?: number; /** Maximum generation attempts per graph (default: 50) */ maxAttempts?: number; /** Base seed for reproducibility (default: 42) */ seed?: number; } /** * Result of a single constrained generation attempt. */ export interface GeneratedGraph { /** The generated graph */ graph: Graph; /** Target class the graph was generated for */ targetClass: Exclude; /** Classified class (should match target) */ classifiedAs: GraphClass; /** Whether classification matched the target */ matchesTarget: boolean; /** Structural features of the generated graph */ features: GraphFeatures; /** Classification confidence */ confidence: number; /** Number of attempts before acceptance */ attempts: number; } /** * Generate a graph of a target class that the classifier correctly identifies. * * Iteratively generates candidates using the class-appropriate generator, * extracts features, classifies, and accepts only if the classifier assigns * the target class. Returns the first accepted graph or the best attempt * after maxAttempts. * * @param targetClass - The graph class to generate * @param classifier - A trained classifier for validation * @param config - Generation configuration * @returns A GeneratedGraph with classification validation */ export declare const generateConstrainedGraph: (targetClass: Exclude, classifier: TrainedClassifier, config?: ConstrainedGeneratorConfig) => GeneratedGraph; /** * Generate a batch of constrained graphs for a target class. * * @param targetClass - The graph class to generate * @param count - Number of graphs to generate * @param classifier - A trained classifier for validation * @param config - Generation configuration * @returns Array of GeneratedGraph results */ export declare const generateConstrainedBatch: (targetClass: Exclude, count: number, classifier: TrainedClassifier, config?: ConstrainedGeneratorConfig) => GeneratedGraph[]; //# sourceMappingURL=constrained-generator.d.ts.map