Utilities API Reference

This page documents the documentation helper functions and utility tools.

Documentation Helpers

ERGMUserterms.term_signature — Function
term_signature(term::AbstractERGMTerm) -> String

Generate a signature string for a term showing its fields and types.

Example

using ERGM, ERGMUserterms
term_signature(TemplateTerm(2.5))        # "TemplateTerm(param::Float64, attr::Symbol)"
term_signature(ExampleTerm())            # "ExampleTerm"
source
ERGMUserterms.term_documentation — Function
term_documentation(term::AbstractERGMTerm) -> String

Generate a Markdown documentation stub for a term: heading, signature (term_signature), name, one line per field with its current value, and the three interface methods.

Example

using ERGM, ERGMUserterms
doc = term_documentation(TemplateTerm(2.5))
occursin("Name: template.2.5", doc)                     # true
occursin("`param::Float64` = 2.5", doc)                 # true
source