Class: OpenCV::CvGBTreesParams

Inherits:
Object
  • Object
show all
Extended by:
FFI::DataConverter
Defined in:
lib/ruby/ropencv/ropencv_types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ptr) ⇒ CvGBTreesParams

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of CvGBTreesParams.



21383
21384
21385
21386
21387
21388
21389
# File 'lib/ruby/ropencv/ropencv_types.rb', line 21383

def initialize(ptr)
    @__obj_ptr__ = if ptr.is_a? CvGBTreesParamsStruct
                       ptr
                   else
                       CvGBTreesParamsStruct.new(FFI::AutoPointer.new(ptr,CvGBTreesParamsStruct.method(:release)))
                   end
end

Instance Attribute Details

#__obj_ptr__Object (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



21380
21381
21382
# File 'lib/ruby/ropencv/ropencv_types.rb', line 21380

def __obj_ptr__
  @__obj_ptr__
end

Class Method Details

.from_native(ptr, context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

can be overwritten by the user



21375
21376
21377
# File 'lib/ruby/ropencv/ropencv_types.rb', line 21375

def self.from_native(ptr,context)
    rbind_from_native(ptr,context)
end

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


21344
21345
21346
21347
21348
21349
21350
21351
# File 'lib/ruby/ropencv/ropencv_types.rb', line 21344

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(CvGBTreesParamsStruct)
        raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1
        return super(args.first)
    end

    raise ArgumentError, "no constructor for #{self}(#{args.inspect})"
end

.rbind_from_native(ptr, context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



21363
21364
21365
# File 'lib/ruby/ropencv/ropencv_types.rb', line 21363

def self.rbind_from_native(ptr,context)
    CvGBTreesParams.new(ptr)
end

.rbind_to_native(obj, context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



21354
21355
21356
21357
21358
21359
21360
# File 'lib/ruby/ropencv/ropencv_types.rb', line 21354

def self.rbind_to_native(obj,context)
    if obj.is_a? CvGBTreesParams
        obj.__obj_ptr__
    else
        raise TypeError, "expected kind of #{name}, was #{obj.class}"
    end
end

.to_native(obj, context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

can be overwritten by the user



21369
21370
21371
# File 'lib/ruby/ropencv/ropencv_types.rb', line 21369

def self.to_native(obj,context)
    rbind_to_native(obj,context)
end

Instance Method Details

#__owner__?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

returns true if the underlying pointer is owner of the real object

Returns:

  • (Boolean)


21394
21395
21396
# File 'lib/ruby/ropencv/ropencv_types.rb', line 21394

def __owner__?
    @__obj_ptr__[:bowner]
end

#loss_function_typeObject

wrapper for int loss_function_type



21418
21419
21420
# File 'lib/ruby/ropencv/ropencv_types.rb', line 21418

def loss_function_type()
    Rbind::cvgb_trees_params_get_loss_function_type( self)
end

#loss_function_type=(value) ⇒ Object

wrapper for int loss_function_type



21423
21424
21425
# File 'lib/ruby/ropencv/ropencv_types.rb', line 21423

def loss_function_type=(value)
    Rbind::cvgb_trees_params_set_loss_function_type( self, value)
end

#shrinkageObject

wrapper for float shrinkage



21438
21439
21440
# File 'lib/ruby/ropencv/ropencv_types.rb', line 21438

def shrinkage()
    Rbind::cvgb_trees_params_get_shrinkage( self)
end

#shrinkage=(value) ⇒ Object

wrapper for float shrinkage



21443
21444
21445
# File 'lib/ruby/ropencv/ropencv_types.rb', line 21443

def shrinkage=(value)
    Rbind::cvgb_trees_params_set_shrinkage( self, value)
end

#subsample_portionObject

wrapper for float subsample_portion



21428
21429
21430
# File 'lib/ruby/ropencv/ropencv_types.rb', line 21428

def subsample_portion()
    Rbind::cvgb_trees_params_get_subsample_portion( self)
end

#subsample_portion=(value) ⇒ Object

wrapper for float subsample_portion



21433
21434
21435
# File 'lib/ruby/ropencv/ropencv_types.rb', line 21433

def subsample_portion=(value)
    Rbind::cvgb_trees_params_set_subsample_portion( self, value)
end

#weak_countObject

methods wrapper for int weak_count



21408
21409
21410
# File 'lib/ruby/ropencv/ropencv_types.rb', line 21408

def weak_count()
    Rbind::cvgb_trees_params_get_weak_count( self)
end

#weak_count=(value) ⇒ Object

wrapper for int weak_count



21413
21414
21415
# File 'lib/ruby/ropencv/ropencv_types.rb', line 21413

def weak_count=(value)
    Rbind::cvgb_trees_params_set_weak_count( self, value)
end