LinkDensity.h header
#include <ew/app/LinkDensity.h>
Namespace ew::app
LinkDensity struct
struct ew::app::LinkDensity
A measure of how interconnected the project's codex is: how many times entities are mentioned across documents and other entities, and how many are never mentioned at all (isolated). Higher density and fewer isolated entities mean a more tightly woven world. Building this scans all text, so it is computed on structural changes rather than on every keystroke.
Members
int ew::app::LinkDensity::entityCount = 0
The number of Entity objects.
int ew::app::LinkDensity::totalMentions = 0
The total number of mentions of any entity across the project.
int ew::app::LinkDensity::isolatedEntities = 0
The number of entities that are never mentioned anywhere.
double ew::app::LinkDensity::averageMentionsPerEntity = 0.0
The mean mentions per entity (0 when there are no entities).
Functions
LinkDensity ew::app::linkDensity(const ew::core::Project &project)
Computes the link density for project by building a backlink index over its content.