Macaulay2 » Documentation
Packages » RandomObjects :: randomObjectTemplate
next | previous | forward | backward | up | index | toc

randomObjectTemplate -- a template for the implementation of a random object

Synopsis

Description

A template for the implementation of a new random object. Remember to document what Certify => true actually certifies.

i1 : randomObjectTemplate("foo")

o1 = export {
       constructFoo,
       certifyFoo,
       foo
       }

     constructFoo=method(Options=>{Certify=>false})
     constructFoo(Thing):=opt->(args)->(
        )

     undocumented constructFoo

     certifyFoo=method()
     certifyFoo(Thing,Thing)->(object,args)->(
        )

     undocumented certifyFoo

     foo = new RandomObject from {

                    Construction  => constructFoo,

                    Certification => certifyFoo}

     doc /// 
        Key
         foo
        Headline
        Usage
         (random foo)(args)
        Inputs
         args : Thing
        Outputs
       Consequences
         Item
       Description
         Text
         Tree
         Code
         Pre
         Example
         CannedExample
       ExampleFiles
       Acknowledgement
       Contributors
       References
       Caveat
       SeeAlso
       Subnodes
     ///

Ways to use randomObjectTemplate:

For the programmer

The object randomObjectTemplate is a method function.