Struct ndhistogram::VecHistogram
source · pub struct VecHistogram<A, V> { /* private fields */ }
Expand description
A Histogram that stores its values in a Vec.
See crate::ndhistogram for examples of its use.
Implementations§
source§impl<A: Axis, V: Default + Clone> VecHistogram<A, V>
impl<A: Axis, V: Default + Clone> VecHistogram<A, V>
sourcepub fn new(axes: A) -> Self
pub fn new(axes: A) -> Self
Factory method for VecHistogram. It is recommended to use the ndhistogram macro instead.
source§impl<A, V> VecHistogram<A, V>
impl<A, V> VecHistogram<A, V>
sourcepub fn par_values(&self) -> impl IndexedParallelIterator<Item = &V>where
V: Sync,
pub fn par_values(&self) -> impl IndexedParallelIterator<Item = &V>where V: Sync,
An immutable rayon parallel iterator over the histogram values.
This requires the “rayon” crate feature to be enabled.
sourcepub fn par_values_mut(&mut self) -> impl IndexedParallelIterator<Item = &mut V>where
V: Send,
pub fn par_values_mut(&mut self) -> impl IndexedParallelIterator<Item = &mut V>where V: Send,
A mutable rayon parallel iterator over the histogram values.
This requires the “rayon” crate feature to be enabled.
sourcepub fn par_iter(
&self
) -> impl IndexedParallelIterator<Item = Item<<A as Axis>::BinInterval, &V>>where
A: Axis + Sync,
V: Sync,
<A as Axis>::BinInterval: Send,
pub fn par_iter( &self ) -> impl IndexedParallelIterator<Item = Item<<A as Axis>::BinInterval, &V>>where A: Axis + Sync, V: Sync, <A as Axis>::BinInterval: Send,
An immutable rayon parallel iterator over bin indices, bin interval and bin values.
This requires the “rayon” crate feature to be enabled.
sourcepub fn par_iter_mut(
&mut self
) -> impl IndexedParallelIterator<Item = Item<<A as Axis>::BinInterval, &mut V>>where
A: Axis + Sync + Send,
V: Send + Sync,
<A as Axis>::BinInterval: Send,
pub fn par_iter_mut( &mut self ) -> impl IndexedParallelIterator<Item = Item<<A as Axis>::BinInterval, &mut V>>where A: Axis + Sync + Send, V: Send + Sync, <A as Axis>::BinInterval: Send,
An mutable rayon parallel iterator over bin indices, bin interval and bin values.
This requires the “rayon” crate feature to be enabled.
Trait Implementations§
source§impl<A: Axis + PartialEq + Clone, V> Add<&V> for &VecHistogram<A, V>where
for<'a> &'a V: Add<Output = V>,
impl<A: Axis + PartialEq + Clone, V> Add<&V> for &VecHistogram<A, V>where for<'a> &'a V: Add<Output = V>,
source§impl<A: Axis + PartialEq + Clone, V> Add<&VecHistogram<A, V>> for &VecHistogram<A, V>where
for<'a> &'a V: Add<Output = V>,
impl<A: Axis + PartialEq + Clone, V> Add<&VecHistogram<A, V>> for &VecHistogram<A, V>where for<'a> &'a V: Add<Output = V>,
source§fn add(self, rhs: &VecHistogram<A, V>) -> Self::Output
fn add(self, rhs: &VecHistogram<A, V>) -> Self::Output
Combine the right-hand histogram with the left-hand histogram, returning a copy, and leaving the original histograms intact.
If the input histograms have incompatible axes, this operation will return a BinaryOperationError.
Examples
use ndhistogram::{Histogram, ndhistogram, axis::Uniform};
let mut hist1 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
let mut hist2 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
let combined_hist = (&hist1 + &hist2).expect("Axes are compatible");
assert_eq!(combined_hist.value(&0.0).unwrap(), &3.0);
§type Output = Result<VecHistogram<A, V>, BinaryOperationError>
type Output = Result<VecHistogram<A, V>, BinaryOperationError>
+
operator.source§impl<A: Axis + PartialEq, V> Add<&VecHistogram<A, V>> for VecHistogram<A, V>where
for<'a> V: AddAssign<&'a V>,
impl<A: Axis + PartialEq, V> Add<&VecHistogram<A, V>> for VecHistogram<A, V>where for<'a> V: AddAssign<&'a V>,
source§fn add(self, rhs: &VecHistogram<A, V>) -> Self::Output
fn add(self, rhs: &VecHistogram<A, V>) -> Self::Output
Combine the right-hand histogram with the left-hand histogram, consuming the left-hand histogram and returning a new value. As this avoids making copies of the histograms, this is the recommended method to merge histograms.
If the input histograms have incompatible axes, this operation will return a BinaryOperationError.
Examples
use ndhistogram::{Histogram, ndhistogram, axis::Uniform};
let mut hist1 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
let mut hist2 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
let combined_hist = (hist1 + &hist2).expect("Axes are compatible");
assert_eq!(combined_hist.value(&0.0).unwrap(), &3.0);
§type Output = Result<VecHistogram<A, V>, BinaryOperationError>
type Output = Result<VecHistogram<A, V>, BinaryOperationError>
+
operator.source§impl<A: Axis + PartialEq, V> AddAssign<&VecHistogram<A, V>> for VecHistogram<A, V>where
for<'a> V: AddAssign<&'a V>,
impl<A: Axis + PartialEq, V> AddAssign<&VecHistogram<A, V>> for VecHistogram<A, V>where for<'a> V: AddAssign<&'a V>,
source§fn add_assign(&mut self, rhs: &VecHistogram<A, V>)
fn add_assign(&mut self, rhs: &VecHistogram<A, V>)
Combine the right-hand histogram with the left-hand histogram, mutating the left-hand histogram.
Panics
Panics if the histograms have incompatible axes. To handle this failure mode at runtime, use the non-assign version of this operation, which returns an Result.
Examples
use ndhistogram::{Histogram, ndhistogram, axis::Uniform};
let mut hist1 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
let mut hist2 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
hist1 += &hist2;
assert_eq!(hist1.value(&0.0).unwrap(), &3.0);
source§impl<A: Clone, V: Clone> Clone for VecHistogram<A, V>
impl<A: Clone, V: Clone> Clone for VecHistogram<A, V>
source§fn clone(&self) -> VecHistogram<A, V>
fn clone(&self) -> VecHistogram<A, V>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<A: Default, V: Default> Default for VecHistogram<A, V>
impl<A: Default, V: Default> Default for VecHistogram<A, V>
source§fn default() -> VecHistogram<A, V>
fn default() -> VecHistogram<A, V>
source§impl<'de, A, V> Deserialize<'de> for VecHistogram<A, V>where
A: Deserialize<'de>,
V: Deserialize<'de>,
impl<'de, A, V> Deserialize<'de> for VecHistogram<A, V>where A: Deserialize<'de>, V: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl<A: Axis, V> Display for VecHistogram<A, V>where
V: Clone + Into<f64>,
A::BinInterval: Display,
impl<A: Axis, V> Display for VecHistogram<A, V>where V: Clone + Into<f64>, A::BinInterval: Display,
source§impl<A: Axis + PartialEq + Clone, V> Div<&V> for &VecHistogram<A, V>where
for<'a> &'a V: Div<Output = V>,
impl<A: Axis + PartialEq + Clone, V> Div<&V> for &VecHistogram<A, V>where for<'a> &'a V: Div<Output = V>,
source§impl<A: Axis + PartialEq + Clone, V> Div<&VecHistogram<A, V>> for &VecHistogram<A, V>where
for<'a> &'a V: Div<Output = V>,
impl<A: Axis + PartialEq + Clone, V> Div<&VecHistogram<A, V>> for &VecHistogram<A, V>where for<'a> &'a V: Div<Output = V>,
source§fn div(self, rhs: &VecHistogram<A, V>) -> Self::Output
fn div(self, rhs: &VecHistogram<A, V>) -> Self::Output
Combine the right-hand histogram with the left-hand histogram, returning a copy, and leaving the original histograms intact.
If the input histograms have incompatible axes, this operation will return a BinaryOperationError.
Examples
use ndhistogram::{Histogram, ndhistogram, axis::Uniform};
let mut hist1 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
let mut hist2 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
let combined_hist = (&hist1 / &hist2).expect("Axes are compatible");
assert_eq!(combined_hist.value(&0.0).unwrap(), &2.0);
§type Output = Result<VecHistogram<A, V>, BinaryOperationError>
type Output = Result<VecHistogram<A, V>, BinaryOperationError>
/
operator.source§impl<A: Axis + PartialEq, V> Div<&VecHistogram<A, V>> for VecHistogram<A, V>where
for<'a> V: DivAssign<&'a V>,
impl<A: Axis + PartialEq, V> Div<&VecHistogram<A, V>> for VecHistogram<A, V>where for<'a> V: DivAssign<&'a V>,
source§fn div(self, rhs: &VecHistogram<A, V>) -> Self::Output
fn div(self, rhs: &VecHistogram<A, V>) -> Self::Output
Combine the right-hand histogram with the left-hand histogram, consuming the left-hand histogram and returning a new value. As this avoids making copies of the histograms, this is the recommended method to merge histograms.
If the input histograms have incompatible axes, this operation will return a BinaryOperationError.
Examples
use ndhistogram::{Histogram, ndhistogram, axis::Uniform};
let mut hist1 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
let mut hist2 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
let combined_hist = (hist1 / &hist2).expect("Axes are compatible");
assert_eq!(combined_hist.value(&0.0).unwrap(), &2.0);
§type Output = Result<VecHistogram<A, V>, BinaryOperationError>
type Output = Result<VecHistogram<A, V>, BinaryOperationError>
/
operator.source§impl<A: Axis + PartialEq, V> DivAssign<&VecHistogram<A, V>> for VecHistogram<A, V>where
for<'a> V: DivAssign<&'a V>,
impl<A: Axis + PartialEq, V> DivAssign<&VecHistogram<A, V>> for VecHistogram<A, V>where for<'a> V: DivAssign<&'a V>,
source§fn div_assign(&mut self, rhs: &VecHistogram<A, V>)
fn div_assign(&mut self, rhs: &VecHistogram<A, V>)
Combine the right-hand histogram with the left-hand histogram, mutating the left-hand histogram.
Panics
Panics if the histograms have incompatible axes. To handle this failure mode at runtime, use the non-assign version of this operation, which returns an Result.
Examples
use ndhistogram::{Histogram, ndhistogram, axis::Uniform};
let mut hist1 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
let mut hist2 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
hist1 /= &hist2;
assert_eq!(hist1.value(&0.0).unwrap(), &2.0);
source§impl<A: Axis, V> Histogram<A, V> for VecHistogram<A, V>
impl<A: Axis, V> Histogram<A, V> for VecHistogram<A, V>
source§fn value(&self, coordinate: &A::Coordinate) -> Option<&V>
fn value(&self, coordinate: &A::Coordinate) -> Option<&V>
source§fn value_at_index(&self, index: usize) -> Option<&V>
fn value_at_index(&self, index: usize) -> Option<&V>
source§fn iter<'a>(
&'a self
) -> Box<dyn Iterator<Item = Item<A::BinInterval, &'a V>> + 'a>
fn iter<'a>( &'a self ) -> Box<dyn Iterator<Item = Item<A::BinInterval, &'a V>> + 'a>
source§fn value_at_index_mut(&mut self, index: usize) -> Option<&mut V>
fn value_at_index_mut(&mut self, index: usize) -> Option<&mut V>
source§fn values_mut(&mut self) -> Box<dyn Iterator<Item = &'_ mut V> + '_>
fn values_mut(&mut self) -> Box<dyn Iterator<Item = &'_ mut V> + '_>
source§fn iter_mut(
&mut self
) -> Box<dyn Iterator<Item = Item<<A as Axis>::BinInterval, &'_ mut V>> + '_>
fn iter_mut( &mut self ) -> Box<dyn Iterator<Item = Item<<A as Axis>::BinInterval, &'_ mut V>> + '_>
source§fn value_mut(&mut self, coordinate: &A::Coordinate) -> Option<&mut V>
fn value_mut(&mut self, coordinate: &A::Coordinate) -> Option<&mut V>
source§fn fill_with<D>(&mut self, coordinate: &A::Coordinate, data: D)where
V: FillWith<D>,
Self: Sized,
fn fill_with<D>(&mut self, coordinate: &A::Coordinate, data: D)where V: FillWith<D>, Self: Sized,
source§fn fill_with_weighted<D, W>(
&mut self,
coordinate: &A::Coordinate,
data: D,
weight: W
)where
V: FillWithWeighted<D, W>,
Self: Sized,
fn fill_with_weighted<D, W>( &mut self, coordinate: &A::Coordinate, data: D, weight: W )where V: FillWithWeighted<D, W>, Self: Sized,
source§impl<'a, A: Axis, V> IntoIterator for &'a VecHistogram<A, V>
impl<'a, A: Axis, V> IntoIterator for &'a VecHistogram<A, V>
source§impl<'a, A: Axis, V: 'a> IntoIterator for &'a mut VecHistogram<A, V>
impl<'a, A: Axis, V: 'a> IntoIterator for &'a mut VecHistogram<A, V>
source§impl<A: Axis + PartialEq + Clone, V> Mul<&V> for &VecHistogram<A, V>where
for<'a> &'a V: Mul<Output = V>,
impl<A: Axis + PartialEq + Clone, V> Mul<&V> for &VecHistogram<A, V>where for<'a> &'a V: Mul<Output = V>,
source§impl<A: Axis + PartialEq + Clone, V> Mul<&VecHistogram<A, V>> for &VecHistogram<A, V>where
for<'a> &'a V: Mul<Output = V>,
impl<A: Axis + PartialEq + Clone, V> Mul<&VecHistogram<A, V>> for &VecHistogram<A, V>where for<'a> &'a V: Mul<Output = V>,
source§fn mul(self, rhs: &VecHistogram<A, V>) -> Self::Output
fn mul(self, rhs: &VecHistogram<A, V>) -> Self::Output
Combine the right-hand histogram with the left-hand histogram, returning a copy, and leaving the original histograms intact.
If the input histograms have incompatible axes, this operation will return a BinaryOperationError.
Examples
use ndhistogram::{Histogram, ndhistogram, axis::Uniform};
let mut hist1 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
let mut hist2 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
let combined_hist = (&hist1 * &hist2).expect("Axes are compatible");
assert_eq!(combined_hist.value(&0.0).unwrap(), &2.0);
§type Output = Result<VecHistogram<A, V>, BinaryOperationError>
type Output = Result<VecHistogram<A, V>, BinaryOperationError>
*
operator.source§impl<A: Axis + PartialEq, V> Mul<&VecHistogram<A, V>> for VecHistogram<A, V>where
for<'a> V: MulAssign<&'a V>,
impl<A: Axis + PartialEq, V> Mul<&VecHistogram<A, V>> for VecHistogram<A, V>where for<'a> V: MulAssign<&'a V>,
source§fn mul(self, rhs: &VecHistogram<A, V>) -> Self::Output
fn mul(self, rhs: &VecHistogram<A, V>) -> Self::Output
Combine the right-hand histogram with the left-hand histogram, consuming the left-hand histogram and returning a new value. As this avoids making copies of the histograms, this is the recommended method to merge histograms.
If the input histograms have incompatible axes, this operation will return a BinaryOperationError.
Examples
use ndhistogram::{Histogram, ndhistogram, axis::Uniform};
let mut hist1 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
let mut hist2 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
let combined_hist = (hist1 * &hist2).expect("Axes are compatible");
assert_eq!(combined_hist.value(&0.0).unwrap(), &2.0);
§type Output = Result<VecHistogram<A, V>, BinaryOperationError>
type Output = Result<VecHistogram<A, V>, BinaryOperationError>
*
operator.source§impl<A: Axis + PartialEq, V> MulAssign<&VecHistogram<A, V>> for VecHistogram<A, V>where
for<'a> V: MulAssign<&'a V>,
impl<A: Axis + PartialEq, V> MulAssign<&VecHistogram<A, V>> for VecHistogram<A, V>where for<'a> V: MulAssign<&'a V>,
source§fn mul_assign(&mut self, rhs: &VecHistogram<A, V>)
fn mul_assign(&mut self, rhs: &VecHistogram<A, V>)
Combine the right-hand histogram with the left-hand histogram, mutating the left-hand histogram.
Panics
Panics if the histograms have incompatible axes. To handle this failure mode at runtime, use the non-assign version of this operation, which returns an Result.
Examples
use ndhistogram::{Histogram, ndhistogram, axis::Uniform};
let mut hist1 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
let mut hist2 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
hist1 *= &hist2;
assert_eq!(hist1.value(&0.0).unwrap(), &2.0);
source§impl<A: Ord, V: Ord> Ord for VecHistogram<A, V>
impl<A: Ord, V: Ord> Ord for VecHistogram<A, V>
source§fn cmp(&self, other: &VecHistogram<A, V>) -> Ordering
fn cmp(&self, other: &VecHistogram<A, V>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl<A: PartialEq, V: PartialEq> PartialEq<VecHistogram<A, V>> for VecHistogram<A, V>
impl<A: PartialEq, V: PartialEq> PartialEq<VecHistogram<A, V>> for VecHistogram<A, V>
source§fn eq(&self, other: &VecHistogram<A, V>) -> bool
fn eq(&self, other: &VecHistogram<A, V>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<A: PartialOrd, V: PartialOrd> PartialOrd<VecHistogram<A, V>> for VecHistogram<A, V>
impl<A: PartialOrd, V: PartialOrd> PartialOrd<VecHistogram<A, V>> for VecHistogram<A, V>
source§fn partial_cmp(&self, other: &VecHistogram<A, V>) -> Option<Ordering>
fn partial_cmp(&self, other: &VecHistogram<A, V>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<A: Axis + PartialEq + Clone, V> Sub<&V> for &VecHistogram<A, V>where
for<'a> &'a V: Sub<Output = V>,
impl<A: Axis + PartialEq + Clone, V> Sub<&V> for &VecHistogram<A, V>where for<'a> &'a V: Sub<Output = V>,
source§impl<A: Axis + PartialEq + Clone, V> Sub<&VecHistogram<A, V>> for &VecHistogram<A, V>where
for<'a> &'a V: Sub<Output = V>,
impl<A: Axis + PartialEq + Clone, V> Sub<&VecHistogram<A, V>> for &VecHistogram<A, V>where for<'a> &'a V: Sub<Output = V>,
source§fn sub(self, rhs: &VecHistogram<A, V>) -> Self::Output
fn sub(self, rhs: &VecHistogram<A, V>) -> Self::Output
Combine the right-hand histogram with the left-hand histogram, returning a copy, and leaving the original histograms intact.
If the input histograms have incompatible axes, this operation will return a BinaryOperationError.
Examples
use ndhistogram::{Histogram, ndhistogram, axis::Uniform};
let mut hist1 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
let mut hist2 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
let combined_hist = (&hist1 - &hist2).expect("Axes are compatible");
assert_eq!(combined_hist.value(&0.0).unwrap(), &1.0);
§type Output = Result<VecHistogram<A, V>, BinaryOperationError>
type Output = Result<VecHistogram<A, V>, BinaryOperationError>
-
operator.source§impl<A: Axis + PartialEq, V> Sub<&VecHistogram<A, V>> for VecHistogram<A, V>where
for<'a> V: SubAssign<&'a V>,
impl<A: Axis + PartialEq, V> Sub<&VecHistogram<A, V>> for VecHistogram<A, V>where for<'a> V: SubAssign<&'a V>,
source§fn sub(self, rhs: &VecHistogram<A, V>) -> Self::Output
fn sub(self, rhs: &VecHistogram<A, V>) -> Self::Output
Combine the right-hand histogram with the left-hand histogram, consuming the left-hand histogram and returning a new value. As this avoids making copies of the histograms, this is the recommended method to merge histograms.
If the input histograms have incompatible axes, this operation will return a BinaryOperationError.
Examples
use ndhistogram::{Histogram, ndhistogram, axis::Uniform};
let mut hist1 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
let mut hist2 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
let combined_hist = (hist1 - &hist2).expect("Axes are compatible");
assert_eq!(combined_hist.value(&0.0).unwrap(), &1.0);
§type Output = Result<VecHistogram<A, V>, BinaryOperationError>
type Output = Result<VecHistogram<A, V>, BinaryOperationError>
-
operator.source§impl<A: Axis + PartialEq, V> SubAssign<&VecHistogram<A, V>> for VecHistogram<A, V>where
for<'a> V: SubAssign<&'a V>,
impl<A: Axis + PartialEq, V> SubAssign<&VecHistogram<A, V>> for VecHistogram<A, V>where for<'a> V: SubAssign<&'a V>,
source§fn sub_assign(&mut self, rhs: &VecHistogram<A, V>)
fn sub_assign(&mut self, rhs: &VecHistogram<A, V>)
Combine the right-hand histogram with the left-hand histogram, mutating the left-hand histogram.
Panics
Panics if the histograms have incompatible axes. To handle this failure mode at runtime, use the non-assign version of this operation, which returns an Result.
Examples
use ndhistogram::{Histogram, ndhistogram, axis::Uniform};
let mut hist1 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
let mut hist2 = ndhistogram!(Uniform::<f64>::new(10, -5.0, 5.0));
hist1.fill_with(&0.0, 2.0);
hist2.fill(&0.0);
hist1 -= &hist2;
assert_eq!(hist1.value(&0.0).unwrap(), &1.0);