Version: 1.0
drag_statistics.cpp
Go to the documentation of this file.
1 // Copyright (c) 2020, the GRAPHGEN contributors, as
2 // shown by the AUTHORS file. All rights reserved.
3 //
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
6 
7 #include "drag_statistics.h"
8 
9 #include <iostream>
10 
11 void PrintStats(const BinaryDrag<conact>& bd, std::ostream& os) {
12  BinaryDragStatistics bds(bd);
13  os << "nodes:" << bds.Nodes() << "; leaves = " << bds.Leaves() << "\n";
14 }
Calculates the statistics of a binary drag with one or multiple roots.
auto Nodes() const
Returns the number of unique nodes inside the DRAG.
auto Leaves() const
Returns the number of unique leaves inside the DRAG.
void PrintStats(const BinaryDrag< conact > &bd, std::ostream &os)
Displays on the specified output stream the statistics of a DRAG (number of unique nodes an unique le...