Class: OpenCV::Cv::Ptr::Cv_Ml_SVM
- Inherits:
-
Object
- Object
- OpenCV::Cv::Ptr::Cv_Ml_SVM
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/ropencv/ropencv_types.rb
Specializing collapse
Class Method Summary collapse
- .new(*args) ⇒ Object
-
.null ⇒ Object
returns a null pointer to the object.
Instance Method Summary collapse
- #empty ⇒ Bool
- #get ⇒ Cv::Ml::SVM
-
#release ⇒ Void
methods.
- #reset(p) ⇒ Void
- #swap(other) ⇒ Void
-
#to_s ⇒ Object
converts Ptr::Cv_Ml_SVM into a string by crawling through all its attributes.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args) ⇒ Object
53920 53921 53922 53923 |
# File 'lib/ropencv/ropencv_types.rb', line 53920 def method_missing(m,*args) raise "Ptr cv::Ptr is empty. Cannot call #{m} on it!" if empty get.method(m).call(*args) end |
Class Method Details
.ptr ⇒ Object .ptr ⇒ Object .ptr ⇒ Object .ptr ⇒ Object .ptr ⇒ Object
53724 53725 53726 53727 53728 53729 53730 53731 53732 53733 53734 53735 53736 53737 53738 53739 53740 53741 53742 53743 53744 53745 53746 53747 53748 53749 53750 53751 53752 53753 53754 53755 53756 53757 53758 53759 53760 53761 53762 53763 53764 53765 53766 53767 53768 53769 53770 53771 53772 53773 53774 53775 53776 53777 53778 53779 53780 53781 53782 53783 53784 53785 53786 53787 53788 53789 53790 53791 53792 53793 53794 53795 53796 53797 53798 53799 53800 |
# File 'lib/ropencv/ropencv_types.rb', line 53724 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Ptr::Cv_Ml_SVMStruct) raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1 return super(args.first) end # overloaded method wrapper for cv::Ptr<cv::ml::SVM>::Ptr<cv::ml::SVM>() @@cv_ptr_cv_ml_svm_ptr_cv_ml_svm_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) targs = args.clone targs.size.upto(-1) do |i| targs[i] = @@cv_ptr_cv_ml_svm_ptr_cv_ml_svm_defaults0[i] end begin return Rbind::cv_ptr_cv_ml_svm_ptr_cv_ml_svm(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Ptr<cv::ml::SVM>::Ptr<cv::ml::SVM>(cv::Ptr<cv::ml::SVM> other) @@cv_ptr_cv_ml_svm_ptr_cv_ml_svm_2_defaults1 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_ptr_cv_ml_svm_ptr_cv_ml_svm_2_defaults1[i] end begin return Rbind::cv_ptr_cv_ml_svm_ptr_cv_ml_svm_2(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Ptr<cv::ml::SVM>::Ptr<cv::ml::SVM>(cv::Ptr<cv::ml::SVM> owner, cv::ml::SVM* p) @@cv_ptr_cv_ml_svm_ptr_cv_ml_svm_3_defaults2 ||= [nil, nil] if(args.size >= 2 && args.size <= 2) targs = args.clone targs.size.upto(1) do |i| targs[i] = @@cv_ptr_cv_ml_svm_ptr_cv_ml_svm_3_defaults2[i] end begin return Rbind::cv_ptr_cv_ml_svm_ptr_cv_ml_svm_3(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Ptr<cv::ml::SVM>::Ptr<cv::ml::SVM>(cv::ml::SVM* p) @@cv_ptr_cv_ml_svm_ptr_cv_ml_svm_4_defaults3 ||= [nil] if(args.size >= 1 && args.size <= 1) targs = args.clone targs.size.upto(0) do |i| targs[i] = @@cv_ptr_cv_ml_svm_ptr_cv_ml_svm_4_defaults3[i] end begin return Rbind::cv_ptr_cv_ml_svm_ptr_cv_ml_svm_4(*targs) rescue TypeError => e @error = e end end # overloaded method wrapper for cv::Ptr<cv::ml::SVM>::Ptr<cv::ml::SVM>(cv::Ptr<cv::ml::StatModel> owner, cv::ml::SVM* p) @@cv_ptr_cv_ml_svm_ptr_cv_ml_svm_5_defaults4 ||= [nil, nil] if(args.size >= 2 && args.size <= 2) targs = args.clone targs.size.upto(1) do |i| targs[i] = @@cv_ptr_cv_ml_svm_ptr_cv_ml_svm_5_defaults4[i] end begin return Rbind::cv_ptr_cv_ml_svm_ptr_cv_ml_svm_5(*targs) rescue TypeError => e @error = e end end raise ArgumentError, "no constructor for #{self}(#{args.inspect})" end |
.null ⇒ Object
returns a null pointer to the object
53705 53706 53707 |
# File 'lib/ropencv/ropencv_types.rb', line 53705 def self.null new(Ptr::Cv_Ml_SVMStruct.new) end |
Instance Method Details
#empty ⇒ Bool
Note:
method wrapper for bool cv::Ptrcv::ml::SVM::empty()
53912 53913 53914 53915 |
# File 'lib/ropencv/ropencv_types.rb', line 53912 def empty() __validate_pointer__ Rbind::cv_ptr_cv_ml_svm_empty( self) end |
#get ⇒ Cv::Ml::SVM
Note:
method wrapper for cv::ml::SVM* cv::Ptrcv::ml::SVM::get()
53900 53901 53902 53903 53904 53905 53906 53907 53908 |
# File 'lib/ropencv/ropencv_types.rb', line 53900 def get() __validate_pointer__ result = Rbind::cv_ptr_cv_ml_svm_get( self) if result.respond_to?(:__owner__?) && !result.__owner__? # store owner insight the pointer to not get garbage collected result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) end result end |
#release ⇒ Void
Note:
method wrapper for void cv::Ptrcv::ml::SVM::release()
methods
53877 53878 53879 53880 |
# File 'lib/ropencv/ropencv_types.rb', line 53877 def release() __validate_pointer__ Rbind::cv_ptr_cv_ml_svm_release( self) end |
#reset(p) ⇒ Void
Note:
method wrapper for void cv::Ptrcv::ml::SVM::reset(cv::ml::SVM* p)
53885 53886 53887 53888 |
# File 'lib/ropencv/ropencv_types.rb', line 53885 def reset(p) __validate_pointer__ Rbind::cv_ptr_cv_ml_svm_reset( self, p) end |
#swap(other) ⇒ Void
Note:
method wrapper for void cv::Ptrcv::ml::SVM::swap(cv::Ptrcv::ml::SVM other)
53893 53894 53895 53896 |
# File 'lib/ropencv/ropencv_types.rb', line 53893 def swap(other) __validate_pointer__ Rbind::cv_ptr_cv_ml_svm_swap( self, other) end |
#to_s ⇒ Object
converts Ptr::Cv_Ml_SVM into a string by crawling through all its attributes
53866 53867 53868 |
# File 'lib/ropencv/ropencv_types.rb', line 53866 def to_s "#<cv::Ptr<cv::ml::SVM> >" end |