Skip to Content
VectorLib

TrConfPair

vectorlib::TrConfPair — fields, methods, parameters and return types.


pub struct TrConfPair<T>

A value with a confidence (tr_conf_pair<T>).

View source

Methods

Prop

Type

new

pub const fn new(principal: T, confidence: f32) -> Self

A value with its confidence.

Parameters

Prop

Type

Returns

Self

View source

set_confidence

pub fn set_confidence(&mut self, confidence: f32)

Set the confidence.

Parameters

Prop

Type

Returns

()

View source

set_value

pub fn set_value(&mut self, principal: T)

Set the value.

Parameters

Prop

Type

Returns

()

View source

get_value

pub fn get_value(&self) -> T

The value.

Returns

T

View source

get_confidence

pub fn get_confidence(&self) -> f32

The confidence.

Returns

f32

View source