<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Win32.SafeHandles;
using System.Runtime.InteropServices;
using OpenCV.Net.Native;

namespace OpenCV.Net
{
    public class CvConDensation : SafeHandleZeroOrMinusOneIsInvalid
    {
        IntPtr dynamMatr;
        IntPtr state;
        IntPtr flSamples;
        IntPtr flNewSamples;
        IntPtr flConfidence;
        IntPtr flCumulative;

        public CvConDensation(int dynam_params, int measure_params, int sample_count)
            : base(true)
        {
            var pCondens = legacy.cvCreateConDensation(dynam_params, measure_params, sample_count);
            SetHandle(pCondens);

            unsafe
            {
                dynamMatr = (IntPtr)((_CvConDensation*)handle.ToPointer())->DynamMatr;
                state = (IntPtr)((_CvConDensation*)handle.ToPointer())->State;
                flSamples = (IntPtr)((_CvConDensation*)handle.ToPointer())->flSamples;
                flNewSamples = (IntPtr)((_CvConDensation*)handle.ToPointer())->flNewSamples;
                flConfidence = (IntPtr)((_CvConDensation*)handle.ToPointer())->flConfidence;
                flCumulative = (IntPtr)((_CvConDensation*)handle.ToPointer())->flCumulative;
            }
        }

        public IntPtr DynamMatr
        {
            get { return dynamMatr; }
        }

        public IntPtr State
        {
            get { return state; }
        }

        public IntPtr Samples
        {
            get { return flSamples; }
        }

        public IntPtr NewSamples
        {
            get { return flNewSamples; }
        }

        public IntPtr Confidence
        {
            get { return flConfidence; }
        }

        public IntPtr Cumulative
        {
            get { return flCumulative; }
        }

        public void UpdateByTime()
        {
            legacy.cvConDensUpdateByTime(this);
        }

        public void InitSampleSet(CvMat lower_bound, CvMat upper_bound)
        {<commit_msg>Added extra read-only properties for CvConDensation.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Win32.SafeHandles;
using System.Runtime.InteropServices;
using OpenCV.Net.Native;

namespace OpenCV.Net
{
    public class CvConDensation : SafeHandleZeroOrMinusOneIsInvalid
    {
        int dp;
        int mp;
        int samplesNum;
        IntPtr dynamMatr;
        IntPtr state;
        IntPtr flNewSamples;
        IntPtr flCumulative;

        public CvConDensation(int dynam_params, int measure_params, int sample_count)
            : base(true)
        {
            var pCondens = legacy.cvCreateConDensation(dynam_params, measure_params, sample_count);
            SetHandle(pCondens);

            unsafe
            {
                dp = ((_CvConDensation*)handle.ToPointer())->DP;
                mp = ((_CvConDensation*)handle.ToPointer())->MP;
                samplesNum = ((_CvConDensation*)handle.ToPointer())->SamplesNum;
                dynamMatr = (IntPtr)((_CvConDensation*)handle.ToPointer())->DynamMatr;
                state = (IntPtr)((_CvConDensation*)handle.ToPointer())->State;
                flNewSamples = (IntPtr)((_CvConDensation*)handle.ToPointer())->flNewSamples;
                flCumulative = (IntPtr)((_CvConDensation*)handle.ToPointer())->flCumulative;
            }
        }

        public int DP
        {
            get { return dp; }
        }

        public int MP
        {
            get { return mp; }
        }

        public int SamplesNum
        {
            get { return samplesNum; }
        }

        public IntPtr DynamMatr
        {
            get { return dynamMatr; }
        }

        public IntPtr State
        {
            get { return state; }
        }

        public IntPtr Samples
        {
            get
            {
                unsafe { return (IntPtr)((_CvConDensation*)handle.ToPointer())->flSamples; }
            }
        }

        public IntPtr NewSamples
        {
            get { return flNewSamples; }
        }

        public IntPtr Confidence
        {
            get
            {
                unsafe { return (IntPtr)((_CvConDensation*)handle.ToPointer())->flConfidence; }
            }
        }

        public IntPtr Cumulative
        {
            get { return flCumulative; }
        }

        public void UpdateByTime()
        {
            legacy.cvConDensUpdateByTime(this);
        }

        public void InitSampleSet(CvMat lower_bound, CvMat upper_bound)
        {
{'fraction_non_alphanumeric': 0.0889950075971348, 'fraction_numerical': 0.0008682439765574126, 'mean_word_length': 1.765906362545018, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2984585', 'n_tokens_mistral': 1358, 'n_tokens_neox': 1277, 'n_words': 239}