pub struct ImplicitGain { /* private fields */ }Expand description
Gain is similar in effect to Bias, and in fact uses Bias in its working. It applies the following function to the source input:
if(t<0.5) {
return bias(1.0-g, 2.0*t)/2.0;
} else {
return 1.0 - bias(1.0-g, 2.0 - 2.0*t)/2.0;
}This function has the effect of pushing the values of the input either toward the ends and away from the middle (if bias is >0.5) or pushing values toward the middle and away from the ends (if bias is < 0.5).
Implementations§
Source§impl ImplicitGain
impl ImplicitGain
pub fn with_gain(g: f64) -> ImplicitGain
pub fn with_module(m: Rc<RefCell<dyn ImplicitModule>>) -> ImplicitGain
pub fn set_gain_module(&mut self, m: Rc<RefCell<dyn ImplicitModule>>)
pub fn set_gain_value(&mut self, v: f64)
pub fn set_source_module(&mut self, m: Rc<RefCell<dyn ImplicitModule>>)
pub fn set_source_value(&mut self, v: f64)
Trait Implementations§
Source§impl ImplicitModule for ImplicitGain
impl ImplicitModule for ImplicitGain
fn get_2d(&mut self, x: f64, y: f64) -> f64
fn get_3d(&mut self, x: f64, y: f64, z: f64) -> f64
fn get_4d(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64
fn get_6d(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64
fn spacing(&self) -> f64
fn set_deriv_spacing(&mut self, s: f64)
fn set_seed(&mut self, _: u32)
fn get_dx_2(&mut self, x: f64, y: f64) -> f64
fn get_dy_2(&mut self, x: f64, y: f64) -> f64
fn get_dx_3(&mut self, x: f64, y: f64, z: f64) -> f64
fn get_dy_3(&mut self, x: f64, y: f64, z: f64) -> f64
fn get_dz_3(&mut self, x: f64, y: f64, z: f64) -> f64
fn get_dx_4(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64
fn get_dy_4(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64
fn get_dz_4(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64
fn get_dw_4(&mut self, x: f64, y: f64, z: f64, w: f64) -> f64
fn get_dx_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64
fn get_dy_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64
fn get_dz_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64
fn get_dw_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64
fn get_du_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64
fn get_dv_6(&mut self, x: f64, y: f64, z: f64, w: f64, u: f64, v: f64) -> f64
Auto Trait Implementations§
impl Freeze for ImplicitGain
impl !RefUnwindSafe for ImplicitGain
impl !Send for ImplicitGain
impl !Sync for ImplicitGain
impl Unpin for ImplicitGain
impl !UnwindSafe for ImplicitGain
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