Struct DTrees_Node

Source
pub struct DTrees_Node { /* private fields */ }
Expand description

The class represents a decision tree node.

Implementations§

Trait Implementations§

Source§

impl Boxed for DTrees_Node

Source§

unsafe fn from_raw( ptr: <DTrees_Node as OpenCVFromExtern>::ExternReceive, ) -> Self

Wrap the specified raw pointer Read more
Source§

fn into_raw(self) -> <DTrees_Node as OpenCVTypeExternContainer>::ExternSendMut

Return the underlying raw pointer while consuming this wrapper. Read more
Source§

fn as_raw(&self) -> <DTrees_Node as OpenCVTypeExternContainer>::ExternSend

Return the underlying raw pointer. Read more
Source§

fn as_raw_mut( &mut self, ) -> <DTrees_Node as OpenCVTypeExternContainer>::ExternSendMut

Return the underlying mutable raw pointer Read more
Source§

impl DTrees_NodeTrait for DTrees_Node

Source§

fn as_raw_mut_DTrees_Node(&mut self) -> *mut c_void

Source§

fn set_value(&mut self, val: f64)

Value at the node: a class label in case of classification or estimated function value in case of regression.
Source§

fn set_class_idx(&mut self, val: i32)

Class index normalized to 0..class_count-1 range and assigned to the node. It is used internally in classification trees and tree ensembles.
Source§

fn set_parent(&mut self, val: i32)

Index of the parent node
Source§

fn set_left(&mut self, val: i32)

Index of the left child node
Source§

fn set_right(&mut self, val: i32)

Index of right child node
Source§

fn set_default_dir(&mut self, val: i32)

Default direction where to go (-1: left or +1: right). It helps in the case of missing values.
Source§

fn set_split(&mut self, val: i32)

Index of the first split
Source§

impl DTrees_NodeTraitConst for DTrees_Node

Source§

fn as_raw_DTrees_Node(&self) -> *const c_void

Source§

fn value(&self) -> f64

Value at the node: a class label in case of classification or estimated function value in case of regression.
Source§

fn class_idx(&self) -> i32

Class index normalized to 0..class_count-1 range and assigned to the node. It is used internally in classification trees and tree ensembles.
Source§

fn parent(&self) -> i32

Index of the parent node
Source§

fn left(&self) -> i32

Index of the left child node
Source§

fn right(&self) -> i32

Index of right child node
Source§

fn default_dir(&self) -> i32

Default direction where to go (-1: left or +1: right). It helps in the case of missing values.
Source§

fn split(&self) -> i32

Index of the first split
Source§

impl Debug for DTrees_Node

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for DTrees_Node

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for DTrees_Node

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<Mat> ModifyInplace for Mat
where Mat: Boxed,

Source§

unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res, ) -> Res

Helper function to call OpenCV functions that allow in-place modification of a Mat or another similar object. By passing a mutable reference to the Mat to this function your closure will get called with the read reference and a write references to the same Mat. This is unsafe in a general case as it leads to having non-exclusive mutable access to the internal data, but it can be useful for some performance sensitive operations. One example of an OpenCV function that allows such in-place modification is imgproc::threshold. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.