[core] Linux adaptation of X-Means algorithm