pub struct HybridGenerator { /* private fields */ }Expand description
A hybrid generator that blends rule-based and diffusion-generated data.
The weight parameter controls the balance:
0.0= pure rule-based output1.0= pure diffusion output- Values between blend according to the chosen strategy
Implementations§
Source§impl HybridGenerator
impl HybridGenerator
Sourcepub fn new(weight: f64) -> Self
pub fn new(weight: f64) -> Self
Create a new hybrid generator with the given weight.
The weight is clamped to [0.0, 1.0].
Sourcepub fn blend(
&self,
rule_based: &[Vec<f64>],
diffusion: &[Vec<f64>],
strategy: BlendStrategy,
seed: u64,
) -> Vec<Vec<f64>>
pub fn blend( &self, rule_based: &[Vec<f64>], diffusion: &[Vec<f64>], strategy: BlendStrategy, seed: u64, ) -> Vec<Vec<f64>>
Blend rule-based and diffusion-generated data using the specified strategy.
Both input slices must have the same number of rows and columns.
For Ensemble strategy, all columns will use the weight for interpolation;
use blend_ensemble for column-level control.
§Arguments
rule_based- Data generated by rule-based methodsdiffusion- Data generated by diffusion methodsstrategy- How to blend the two sourcesseed- Random seed for deterministic blending
Sourcepub fn blend_ensemble(
&self,
rule_based: &[Vec<f64>],
diffusion: &[Vec<f64>],
diffusion_columns: &[usize],
) -> Vec<Vec<f64>>
pub fn blend_ensemble( &self, rule_based: &[Vec<f64>], diffusion: &[Vec<f64>], diffusion_columns: &[usize], ) -> Vec<Vec<f64>>
Blend using column-level ensemble: specified columns use diffusion data, remaining columns use rule-based data.
§Arguments
rule_based- Data generated by rule-based methodsdiffusion- Data generated by diffusion methodsdiffusion_columns- Column indices that should use diffusion output
Trait Implementations§
Source§impl Clone for HybridGenerator
impl Clone for HybridGenerator
Source§fn clone(&self) -> HybridGenerator
fn clone(&self) -> HybridGenerator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HybridGenerator
impl RefUnwindSafe for HybridGenerator
impl Send for HybridGenerator
impl Sync for HybridGenerator
impl Unpin for HybridGenerator
impl UnwindSafe for HybridGenerator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more