#pragma once

#include "util.h"
#include "temporaltree.h"
#include <cmath>
#include "treeorder.h"
#include "constraint.h"

TemporalTree computeTreeOrderBarycenter(TemporalTree tree, int sweeps, bool leafedges = false);

TemporalTree computeTreeOrderBarycenterLeafEdges(TemporalTree tree, int sweeps);

TemporalTree computeTreeOrderMedian(TemporalTree tree, int sweeps, bool leafedges = false);

TemporalTree computeTreeOrderMedianLeafEdges(TemporalTree tree, int sweeps);