@@ -243,44 +243,38 @@ ergm_proposal.character <- function(object, arguments, nw, ..., reference=ergm_r
243243}
244244
245245
246-
247-
248-
249- # #######################################################################################
250- # The <ergm_proposal.formula> function verifies that the given constraints exist and
251- # are supported in conjuction with the given weights and class by a unique proposal;
252- # if so the ergm_proposal object is created via <ergm_proposal.character> using the
253- # proposal type found in the look-up table above.
254- #
255- # --PARAMETERS--
256- # object : a one-sided formula of constraint terms ( ~ term(s))
257- # arguments : a list of parameters used by the <InitErgmProposal> routines possibly including
258- # bd: a list of parameters used to bound degree via <ergm.bounddeg>
259- # nw : a network object
260- # constraints: the constraints as a one sided formula '~ term(s)'
261- # weights : specifies the method used to allocate probabilities of being proposed
262- # to dyads; options are "TNT", "StratTNT", "TNT10", "random", "nonobserved" and
263- # "default"; default="default"
264- # class : the class of the proposal; choices include "c", "f", and "d"
265- # default="c"
266- #
267- # #######################################################################################
268-
269- # ' @noRd
246+ # ' Internal representation of ERGM sample space constraints and hints
247+ # '
248+ # ' See [`ergmConstraint`] for details on specifying proposals and
249+ # ' constraints.
250+ # '
251+ # ' @param object a data type
252+ # '
253+ # ' @keywords internal
254+ # ' @export
270255ergm_conlist <- function (object , ... ) UseMethod(" ergm_conlist" )
271256
272- # ' @noRd
257+ # ' @describeIn ergm_conlist identity method.
258+ # ' @export
273259ergm_conlist.ergm_conlist <- function (object , ... ) object
274260
275- # ' @noRd
261+ # ' @describeIn ergm_conlist handling for `NULL`, to simplify other code.
262+ # ' @export
276263ergm_conlist.NULL <- function (object , ... ) NULL
277264
278- # ' @noRd
279- ergm_conlist.formula <- function (object , nw , ... , term.options = list ())
280- object %> % .embed_constraint_lhs() %> % list_rhs.formula() %> %
281- ergm_conlist(nw , ... , term.options = term.options )
265+ # ' @describeIn ergm_conlist initialize from [`formula`], such as in
266+ # ' [ergm()] `constraints` and `obs.constraints` arguments: preserve
267+ # ' the LHS, convert to [`term_list`], and use the nxt method.
268+ # '
269+ # ' @param nw a [`network`] object.
270+ # ' @template term_options
271+ # '
272+ # ' @export
273+ ergm_conlist.formula <- function (object , nw , ... )
274+ object | > .embed_constraint_lhs() | > list_rhs.formula() | > ergm_conlist(nw , ... )
282275
283- # ' @noRd
276+ # ' @describeIn ergm_conlist initialize from [`term_list`].
277+ # ' @export
284278ergm_conlist.term_list <- function (object , nw , ... , term.options = list ()){
285279 object <-
286280 if (is(object , " AsIs" )) structure(object , class = class(object )[class(object ) != " AsIs" ])
@@ -309,10 +303,12 @@ ergm_conlist.term_list <- function(object, nw, ..., term.options=list()){
309303 prune.ergm_conlist(conlist )
310304}
311305
312- # ' @noRd
306+ # ' @describeIn ergm_conlist a concatenation method.
307+ # ' @export
313308c.ergm_conlist <- function (... ) NextMethod() %> % prune.ergm_conlist()
314309
315- # ' @noRd
310+ # ' @describeIn ergm_conlist a subsetting method.
311+ # ' @export
316312`[.ergm_conlist` <- function (x , ... ){
317313 structure(NextMethod(), class = " ergm_conlist" )
318314}
0 commit comments