package com.hithomelabs.clients.Benchmarks;

public class ArraySize {

    private final int size;
    public ArraySize(int n){
        size = n;
    }

    public int getSize() {
        return size;
    }

    public double getNSquare(){
        return Math.pow(size,2);
    }

    public double getNlogN(){
        return size * Math.log(size)/ Math.log(2);
    }

    public double getLogN(){
        return Math.log(size)/ Math.log(2);
    }

    @Override
    public String toString() {
        return "### Sorting an array of size (n) : " + getSize() + " \n" + "n^2 for this array is : " + getNSquare() + "<br> \n" + "nlogn for this array is : " + getNlogN() + "\n";
    }
}
