package cz.vutbr.feec.utko.opencv.operators.lineOperations.lineOperationsClasses;
/**
 * Implementation of the line approximate methods
 * 
 * The functions implements method for a approximate polynomial curve to input points 
 * 
 * Author: Martin Hasmanda
 */

import java.util.Vector;

public class InlierParams {
	/**
	 * Actual inlier count
	 */
	public int num_inliers;
	
	
	/**
	 * Maximal cumulative distance for all inlier
	 */
	public double distance;
	
	/**
	 * The vector of values specifies if is a sample the inlier or outlier
	 */
	public Vector<Boolean> act_inliers; 
	
	/**
	 * Parameters 'k' for a line equation y = kx + q
	 */
	public double k;

	/**
	 * Parameters 'q' for a line equation y = kx + q
	 */	
	public double q;
	
	public double c;
	
	/**
	 * Constructor
	 */
	public InlierParams() {
		num_inliers = 0;
		distance = Double.MAX_VALUE;
		act_inliers = new Vector<Boolean>();
		k = q = c = 0;
	}

	public double RecalcNumInliersForEval()
	{
		return num_inliers * Math.cos(Math.atan(k));
	}
	
	/**
	 * Copy constructor
	 * @param params
	 */
	public InlierParams(InlierParams params) {
		this.num_inliers = params.num_inliers;
		this.distance = params.distance;
		this.act_inliers = new Vector<Boolean>(params.act_inliers);
		this.k = params.k;
		this.q = params.q;
		this.c = params.c;
	}
}
