Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » strings and nets » Net
next | previous | forward | backward | up | index | toc

Net -- the class of all nets and strings

Description

A net is a generalization of a string that is designed to facilitate two-dimensional printing on ascii terminals. It consists of a rectangular array of characters subdivided horizontally by an imaginary baseline.

Operations on nets also accept strings by interpreting a string as a rectangle of height one with the baseline just below it. In fact, the parent of String is Net.

Multiple nets per line can be sent to an output file with << but care must be taken to use endl to end lines, for nets with new line characters embedded in them will be displayed in an unexpected way.

Warning: if so many characters are written to a file that an internal buffer is filled before the line ends or first net is seen, then the buffer will be flushed, and writing a net subsequently will produce an unexpected result.

Menu

Types of net:

  • String -- the class of all strings

Functions and methods returning a net:

  • generateAssertions -- generate assert statements from experimental input
  • horizontalJoin(BasicList) -- see horizontalJoin -- join nets or strings horizontally
  • net -- format for printing, as a net
  • Net ^ ZZ -- raise a net or string
  • String ^ ZZ -- see Net ^ ZZ -- raise a net or string
  • Net | Net -- join strings or nets
  • Net || Net -- join nets or strings vertically
  • peek -- examine contents of an object
  • peek' -- examine contents of an object
  • stack(BasicList) -- see stack -- join nets or string vertically
  • String ^ Sequence -- vertically stacked copies of a string

Methods that use a net:

  • # Net -- see # List -- length or cardinality of a list, hash table, dictionary, set, or string
  • Net #? ZZ -- see #? -- check existence of value in a list, hash table, database, or string
  • capture(Net) -- see capture -- evaluate Macaulay2 code and capture the output
  • depth(Net) -- depth of a net
  • height(Net) -- height of a net
  • length(Net) -- see length(String) -- length of a string
  • Net # ZZ -- see List # ZZ -- get value from list, hash table, database, dictionary, or string
  • NetFile << Net -- see NetFile -- the class of all net files
  • pad(Net,ZZ) -- see pad -- pad a string or net with spaces
  • pad(ZZ,Net) -- see pad -- pad a string or net with spaces
  • File << Net -- see printing to a file -- print to a file
  • unstack(Net) -- see unstack -- list the rows of a net
  • width(Net) -- width of a net

For the programmer

The object Net is a type, with ancestor class Thing.


The source of this document is in Macaulay2Doc/ov_strings.m2:187:0.