% Copyright The Numerical Algorithms Group Limited 1992-94. All rights reserved. % !! DO NOT MODIFY THIS FILE BY HAND !! Created by ht.awk. %following definition should go into ug.sty \texht{\gdef\aliascon#1#2{\axiomType{#1}}}{} \texht{\setcounter{chapter}{13}}{} % Chapter 14 % % \newcommand{\ugBrowseTitle}{Browse} \newcommand{\ugBrowseNumber}{14.} % % ===================================================================== \begin{page}{ugBrowsePage}{14. Browse} % ===================================================================== \beginscroll This chapter discusses the \Browse{} %-% \HDindex{Browse@\Browse{}}{ugBrowsePage}{14.}{Browse} component of \HyperName{}. %-% \HDindex{HyperDoc@{\HyperName{}}}{ugBrowsePage}{14.}{Browse} We suggest you invoke \Language{} and work through this chapter, section by section, following our examples to gain some familiarity with \Browse{}. \beginmenu \menudownlink{{14.1. The Front Page: Searching the Library}}{ugBrowseStartPage} \menudownlink{{14.2. The Constructor Page}}{ugBrowseDomainPage} \menudownlink{{14.3. Miscellaneous Features of Browse}}{ugBrowseMiscellaneousFeaturesPage} \endmenu \endscroll \autobuttons \end{page} % % \newcommand{\ugBrowseStartTitle}{The Front Page: Searching the Library} \newcommand{\ugBrowseStartNumber}{14.1.} % % ===================================================================== \begin{page}{ugBrowseStartPage}{14.1. The Front Page: Searching the Library} % ===================================================================== \beginscroll To enter \Browse{}, click on {\bf Browse} on the top level page of \HyperName{} to get the {\it front page} of \Browse{}. % %324pt is 4.5",180pt is 2.5",432pt is 6"=textwidth,54=(432-324)/2 %ps files are 4.5"x2.5" except source 4.5"x2.5" % To use this page, you first enter a \spadgloss{search string} into the input area at the top, then click on one of the buttons below. We show the use of each of the buttons by example. \subsubsection{Constructors} First enter the search string {\tt Matrix} into the input area and click on {\bf Constructors}. What you get is the {\it constructor page} for \axiomType{Matrix}. We show and describe this page in detail in \downlink{``\ugBrowseDomainTitle''}{ugBrowseDomainPage} in Section \ugBrowseDomainNumber\ignore{ugBrowseDomain}. By convention, \Language{} does a case-insensitive search for a match. Thus {\tt matrix} is just as good as {\tt Matrix}, has the same effect as {\tt MaTrix}, and so on. We recommend that you generally use small letters for names however. A search string with only capital letters has a special meaning (see \downlink{``\ugBrowseCapitalizationConventionTitle''}{ugBrowseCapitalizationConventionPage} in Section \ugBrowseCapitalizationConventionNumber\ignore{ugBrowseCapitalizationConvention}). Click on \UpBitmap{} to return to the \Browse{} front page. Use the symbol ``{\tt *}'' in search strings as a \spadgloss{wild card}. A wild card matches any substring, including the empty string. For example, enter the search string {\tt *matrix*} into the input area and click on {\bf Constructors}.\footnote{To get only categories, domains, or packages, rather than all constructors, you can click on the corresponding button to the right of {\bf Constructors}.} What you get is a table of all constructors whose names contain the string ``{\tt matrix}.'' %% Following para replaced 1995oct30 MGR %These are all the \spadglossSee{exposed}{expose} constructors in %\Language{}. %To see how to get all exposed and unexposed constructors in %\Language{}, skip to the section entitled {\bf Exposure} in %\downlink{``\ugBrowseOptionsTitle''}{ugBrowseOptionsPage} in Section \ugBrowseOptionsNumber\ignore{ugBrowseOptions}. All constructors containing the string are listed, whether \spadglossSee{exposed}{expose} or \spadglossSee{unexposed}{expose}. You can hide the names of the unexposed constructors by clicking on the {\it *=}{\bf unexposed} button in the {\it Views} panel at the bottom of the window. (The button will change to {\bf exposed} {\it only}.) One of the names in this table is \axiomType{Matrix}. Click on \axiomType{Matrix}. What you get is again the constructor page for \axiomType{Matrix}. As you see, \Browse{} gives you a large network of information in which there are many ways to reach the same pages. %-% \HDexptypeindex{Matrix}{ugBrowseStartPage}{14.1.}{The Front Page: Searching the Library} Again click on the \UpBitmap{} to return to the table of constructors whose names contain {\tt matrix}. %Below the table is a {\bf Views} panel. % here & globally MGR 1995oct30 Below the table is a {\it Views} panel. This panel contains buttons that let you view constructors in different ways. To learn about views of constructors, skip to \downlink{``\ugBrowseViewsOfConstructorsTitle''}{ugBrowseViewsOfConstructorsPage} in Section \ugBrowseViewsOfConstructorsNumber\ignore{ugBrowseViewsOfConstructors}. Click on \UpBitmap{} to return to the \Browse{} front page. \subsubsection{Operations} Enter {\tt *matrix} into the input area and click on {\bf Operations}. This time you get a table of {\it operations} whose names end with {\tt matrix} or {\tt Matrix}. If you select an operation name, you go to a page describing all the operations in \Language{} of that name. At the bottom of an operation page is another kind of {\it Views} panel, one for operation pages. To learn more about these views, skip to \downlink{``\ugBrowseViewsOfOperationsTitle''}{ugBrowseViewsOfOperationsPage} in Section \ugBrowseViewsOfOperationsNumber\ignore{ugBrowseViewsOfOperations}. Click on \UpBitmap{} to return to the \Browse{} front page. \subsubsection{Attributes} This button gives you a table of attribute names that match the search string. Enter the search string {\tt *} and click on {\bf Attributes} to get a list of all system attributes. Click on \UpBitmap{} to return to the \Browse{} front page. Again there is a {\it Views} panel at the bottom with buttons that let you view the attributes in different ways. \subsubsection{General} This button does a general search for all constructor, operation, and attribute names matching the search string. Enter the search string \allowbreak {\tt *matrix*} into the input area. Click on {\bf General} to find all constructs that have {\tt matrix} as a part of their name. The summary gives you all the names under a heading when the number of entries is less than 10. % "less than 10." replaces the following: % sufficiently small%\footnote{See %\downlink{``\ugBrowseOptionsTitle''}{ugBrowseOptionsPage} in Section \ugBrowseOptionsNumber\ignore{ugBrowseOptions} to see how you can change this.}. %% MGR 1995oct31 Click on \UpBitmap{} to return to the \Browse{} front page. \subsubsection{Documentation} Again enter the search key {\tt *matrix*} and this time click on {\bf Documentation}. This search matches any constructor, operation, or attribute name whose documentation contains a substring matching {\tt matrix}. Click on \UpBitmap{} to return to the \Browse{} front page. \subsubsection{Complete} This search combines both {\bf General} and {\bf Documentation}. \endscroll \autobuttons \end{page} % % \newcommand{\ugBrowseDomainTitle}{The Constructor Page} \newcommand{\ugBrowseDomainNumber}{14.2.} % % ===================================================================== \begin{page}{ugBrowseDomainPage}{14.2. The Constructor Page} % ===================================================================== \beginscroll In this section we look in detail at a constructor page for domain \axiomType{Matrix}. Enter {\tt matrix} into the input area on the main \Browse{} page and click on {\bf Constructors}. The header part tells you that \axiomType{Matrix} has abbreviation \axiomType{MATRIX} and one argument called {\tt R} that must be a domain of category \axiomType{Ring}. Just what domains can be arguments of \axiomType{Matrix}? To find this out, click on the {\tt R} on the second line of the heading. What you get is a table of all acceptable domain parameter values of {\tt R}, or a table of \spadgloss{rings} in \Language{}. Click on \UpBitmap{} to return to the constructor page for \axiomType{Matrix}. \texht{\newpage}{} If you have access to the source code of \Language{}, the third %-% \HDindex{source code}{ugBrowseDomainPage}{14.2.}{The Constructor Page} line of the heading gives you the name of the source file containing the definition of \axiomType{Matrix}. Click on it to pop up an editor window containing the source code of \axiomType{Matrix}. We recommend that you leave the editor window up while working through this chapter as you occasionally may want to refer to it. \texht{\newpage}{} \beginmenu \menudownlink{{14.2.1. Constructor Page Buttons}}{ugBrowseDomainButtonsPage} \menudownlink{{14.2.2. Cross Reference}}{ugBrowseCrossReferencePage} \menudownlink{{14.2.3. Views Of Constructors}}{ugBrowseViewsOfConstructorsPage} \menudownlink{{14.2.4. Giving Parameters to Constructors}}{ugBrowseGivingParametersPage} \endmenu \endscroll \autobuttons \end{page} % % \newcommand{\ugBrowseDomainButtonsTitle}{Constructor Page Buttons} \newcommand{\ugBrowseDomainButtonsNumber}{14.2.1.} % % ===================================================================== \begin{page}{ugBrowseDomainButtonsPage}{14.2.1. Constructor Page Buttons} % ===================================================================== \beginscroll We examine each button on this page in order. \labelSpace{2pc} \subsubsection{Description} Click here to bring up a page with a brief description of constructor \axiomType{Matrix}. If you have access to system source code, note that these comments can be found directly over the constructor definition. \subsubsection{Operations} Click here to get a table of operations exported by \axiomType{Matrix}. You may wish to widen the window to have multiple columns as below. If you click on an operation name, you bring up a description page for the operations. For a detailed description of these pages, skip to \downlink{``\ugBrowseViewsOfOperationsTitle''}{ugBrowseViewsOfOperationsPage} in Section \ugBrowseViewsOfOperationsNumber\ignore{ugBrowseViewsOfOperations}. \subsubsection{Attributes} Click here to get a table of the two attributes exported by \axiomType{Matrix}: %-% \HDindex{attribute}{ugBrowseDomainButtonsPage}{14.2.1.}{Constructor Page Buttons} \spadatt{\texht{fi\-nite\-Ag\-gre\-gate}{finiteAggregate}} and \spadatt{shallowlyMutable}. These are two computational properties that result from \axiomType{Matrix} being regarded as a data structure. \subsubsection{Examples} Click here to get an {\it examples page} with examples of operations to create and manipulate matrices. Read through this section. Try selecting the various buttons. Notice that if you click on an operation name, such as \spadfunFrom{new}{Matrix}, you bring up a description page for that operation from \axiomType{Matrix}. Example pages have several examples of \Language{} commands. Each example has an active button to its left. Click on it! A pre-computed answer is pasted into the page immediately following the command. If you click on the button a second time, the answer disappears. This button thus acts as a toggle: ``now you see it; now you don't.'' Note also that the \Language{} commands themselves are active. If you want to see \Language{} execute the command, then click on it! A new \Language{} window appears on your screen and the command is executed. \httex{At the end of the page is generally a menu of buttons that lead you to further sections. Select one of these topics to explore its contents.}{} \subsubsection{Exports} Click here to see a page describing the exports of \axiomType{Matrix} exactly as described by the source code. As you see, \axiomType{Matrix} declares that it exports all the operations and attributes exported by category \axiomType{MatrixCategory(R, Row, Col)}. In addition, two operations, \axiomFun{diagonalMatrix} and \axiomFun{inverse}, are explicitly exported. To learn a little about the structure of \Language{}, we suggest you do the following exercise. Otherwise, click on \UpButton{} and go on to the next section. \axiomType{Matrix} explicitly exports only two operations. The other operations are thus exports of \axiomType{MatrixCategory}. In general, operations are usually not explicitly exported by a domain. Typically they are \spadglossSee{inherited}{inherit} from several different categories. Let's find out from where the operations of \axiomType{Matrix} come. \indent{4} \beginitems \item[1. ] Click on {\bf MatrixCategory}, then on {\bf Exports}. Here you see that {\bf MatrixCategory} explicitly exports many matrix operations. Also, it inherits its operations from \axiomType{TwoDimensionalArrayCategory}. \item[2. ] Click on {\bf TwoDimensionalArrayCategory}, then on {\bf Exports}. Here you see explicit operations dealing with rows and columns. In addition, it inherits operations from \axiomType{HomogeneousAggregate}. %\item Click on {\bf HomogeneousAggregate}, then on {\bf Exports}. %And so on. %If you continue doing this, eventually you will \item[3. ] Click on \UpBitmap{} and then click on {\bf Object}, then on {\bf Exports}, where you see there are no exports. \item[4. ] Click on \UpBitmap{} repeatedly to return to the constructor page for \axiomType{Matrix}. \enditems \indent{0} \subsubsection{Related Operations} Click here bringing up a table of operations that are exported by \spadglossSee{packages}{package} but not by \axiomType{Matrix} itself. To see a table of such packages, use the {\bf Relatives} button on the {\bf Cross Reference} page described next. \endscroll \autobuttons \end{page} % % \newcommand{\ugBrowseCrossReferenceTitle}{Cross Reference} \newcommand{\ugBrowseCrossReferenceNumber}{14.2.2.} % % ===================================================================== \begin{page}{ugBrowseCrossReferencePage}{14.2.2. Cross Reference} % ===================================================================== \beginscroll Click on the {\bf Cross Reference} button on the main constructor page for \axiomType{Matrix}. This gives you a page having various cross reference information stored under the respective buttons. \subsubsection{Parents} The parents of a domain are the same as the categories mentioned under the {\bf Exports} button on the first page. Domain \axiomType{Matrix} has only one parent but in general a domain can have any number. \subsubsection{Ancestors} The \spadglossSee{ancestors}{ancestor} of a constructor consist of its parents, the parents of its parents, and so on. Did you perform the exercise in the last section under {\bf Exports}? If so, you see here all the categories you found while ascending the {\bf Exports} chain for \axiomType{Matrix}. \subsubsection{Relatives} The \spadglossSee{relatives}{relative} of a domain constructor are package constructors that provide operations in addition to those \spadglossSee{exported}{export} by the domain. Try this exercise. \indent{4} \beginitems \item[1. ] Click on {\bf Relatives}, bringing up a list of \spadglossSee{packages}{package}. \item[2. ] Click on {\bf LinearSystemMatrixPackage} bringing up its constructor page.\footnote{You may want to widen your \HyperName{} window to make what follows more legible.} \item[3. ] Click on {\bf Operations}. Here you see \axiomFun{rank}, an operation also exported by \axiomType{Matrix} itself. \item[4. ] Click on {\bf rank}. This \spadfunFrom{rank}{LinearSystemMatrixPackage} has two arguments and thus is different from the \spadfunFrom{rank}{Matrix} from \axiomType{Matrix}. \item[5. ] Click on \UpBitmap{} to return to the list of operations for the package \axiomType{LinearSystemMatrixPackage}. \item[6. ] Click on {\bf solve} to bring up a \spadfunFrom{solve}{LinearSystemMatrixPackage} for linear systems of equations. \item[7. ] Click on \UpBitmap{} several times to return to the cross reference page for \axiomType{Matrix}. \enditems \indent{0} \subsubsection{Dependents} The \spadglossSee{dependents}{dependent} of a constructor are those \spadglossSee{domains}{domain} or \spadglossSee{packages}{package} that mention that constructor either as an argument or in its \spadglossSee{exports}{export}. If you click on {\bf Dependents} two entries may surprise you: \axiomType{RectangularMatrix} and \axiomType{SquareMatrix}. This happens because \axiomType{Matrix}, as it turns out, appears in signatures of operations exported by these domains. \subsubsection{Lineage} The term \spadgloss{lineage} refers to the {\it search order} for functions. If you are an expert user or curious about how the \Language{} system works, try the following exercise. Otherwise, you best skip this button and go on to {\bf Clients}. Clicking on {\bf Lineage} gives you a list of domain constructors: \axiomType{InnerIndexedTwoDimensionalArray}, \aliascon{MatrixCategory\&}{MATCAT-}, \aliascon{TwoDimensionalArrayCategory\&}{ARR2CAT-}, \aliascon{HomogeneousAggregate\&}{HOAGG-}, \aliascon{Aggregate\&}{AGG-}. What are these constructors and how are they used? We explain by an example. Suppose you create a matrix using the interpreter, then ask for its \axiomFun{rank}. \Language{} must then find a function implementing the \axiomFun{rank} operation for matrices. The first place \Language{} looks for \axiomFun{rank} is in the \axiomType{Matrix} domain. If not there, the lineage of \axiomType{Matrix} tells \Language{} where else to look. Associated with the matrix domain are five other lineage domains. Their order is important. \Language{} first searches the first one, \axiomType{InnerIndexedTwoDimensionalArray}. If not there, it searches the second \aliascon{MatrixCategory\&}{MATCAT-}. And so on. Where do these {\it lineage constructors} come from? The source code for \axiomType{Matrix} contains this syntax for the \spadgloss{function body} of \axiomType{Matrix}:\footnote{\axiomType{InnerIndexedTwoDimensionalArray} is a special domain implemented for matrix-like domains to provide efficient implementations of \twodim{} arrays. For example, domains of category \axiomType{TwoDimensionalArrayCategory} can have any integer as their \spad{minIndex}. Matrices and other members of this special ``inner'' array have their \spad{minIndex} defined as \spad{1}.} \begin{verbatim} InnerIndexedTwoDimensionalArray(R,mnRow,mnCol,Row,Col) add ... \end{verbatim} where the ``{\tt ...}'' denotes all the code that follows. In English, this means: ``The functions for matrices are defined as those from \axiomType{InnerIndexedTwoDimensionalArray} domain augmented by those defined in `{\tt ...}','' where the latter take precedence. This explains \axiomType{InnerIndexedTwoDimensionalArray}. The other names, those with names ending with an ampersand \axiomSyntax{\&} are \spadglossSee{default packages}{default package} for categories to which \axiomType{Matrix} belongs. Default packages are ordered by the notion of ``closest ancestor.'' \subsubsection{Clients} A client of \axiomType{Matrix} is any constructor that uses \axiomType{Matrix} in its implementation. For example, \axiomType{Complex} is a client of \axiomType{Matrix}; it exports several operations that take matrices as arguments or return matrices as values.\footnote{A constructor is a client of \axiomType{Matrix} if it handles any matrix. For example, a constructor having internal (unexported) operations dealing with matrices is also a client.} \subsubsection{Benefactors} A \spadgloss{benefactor} of \axiomType{Matrix} is any constructor that \axiomType{Matrix} uses in its implementation. This information, like that for clients, is gathered from run-time structures.\footnote{The benefactors exclude constructors such as \axiomType{PrimitiveArray} whose operations macro-expand and so vanish from sight!} Cross reference pages for categories have some different buttons on them. Starting with the constructor page of \axiomType{Matrix}, click on \axiomType{Ring} producing its constructor page. Click on {\bf Cross Reference}, producing the cross-reference page for \axiomType{Ring}. Here are buttons {\bf Parents} and {\bf Ancestors} similar to the notion for domains, except for categories the relationship between parent and child is defined through \spadgloss{category extension}. \subsubsection{Children} Category hierarchies go both ways. There are children as well as parents. A child can have any number of parents, but always at least one. Every category is therefore a descendant of exactly one category: \axiomType{Object}. \subsubsection{Descendants} These are children, children of children, and so on. Category hierarchies are complicated by the fact that categories take parameters. Where a parameterized category fits into a hierarchy {\it may} depend on values of its parameters. In general, the set of categories in \Language{} forms a {\it directed acyclic graph}, that is, a graph with directed arcs and no cycles. \subsubsection{Domains} This produces a table of all domain constructors that can possibly be rings (members of category \axiomType{Ring}). Some domains are unconditional rings. Others are rings for some parameters and not for others. To find out which, select the {\bf conditions} button in the views panel. For example, \axiomType{DirectProduct(n, R)} is a ring if {\tt R} is a ring. \endscroll \autobuttons \end{page} % % \newcommand{\ugBrowseViewsOfConstructorsTitle}{Views Of Constructors} \newcommand{\ugBrowseViewsOfConstructorsNumber}{14.2.3.} % % ===================================================================== \begin{page}{ugBrowseViewsOfConstructorsPage}{14.2.3. Views Of Constructors} % ===================================================================== \beginscroll Below every constructor table page is a {\it Views} panel. As an example, click on {\bf Cross Reference} from the constructor page of \axiomType{Matrix}, then on {\bf Benefactors} to produce a short table of constructor names. The {\it Views} panel is at the bottom of the page. Two items, {\it names} and {\it conditions,} are in italics. Others are active buttons. The active buttons are those that give you useful alternative views on this table of constructors. Once you select a view, you notice that the button turns off (becomes italicized) so that you cannot reselect it. \subsubsection{names} This view gives you a table of names. Selecting any of these names brings up the constructor page for that constructor. \subsubsection{abbrs} This view gives you a table of abbreviations, in the same order as the original constructor names. Abbreviations are in capitals and are limited to 7 characters. They can be used interchangeably with constructor names in input areas. \subsubsection{kinds} This view organizes constructor names into the three kinds: categories, domains and packages. \subsubsection{files} This view gives a table of file names for the source code of the constructors in alphabetic order after removing duplicates. \subsubsection{parameters} This view presents constructors with the arguments. This view of the benefactors of \axiomType{Matrix} shows that \axiomType{Matrix} uses as many as five different \axiomType{List} domains in its implementation. \subsubsection{filter} This button is used to refine the list of names or abbreviations. Starting with the {\it names} view, enter {\tt m*} into the input area and click on {\bf filter}. You then get a shorter table with only the names beginning with {\tt m}. \subsubsection{documentation} This gives you documentation for each of the constructors. \subsubsection{conditions} This page organizes the constructors according to predicates. The view is not available for your example page since all constructors are unconditional. For a table with conditions, return to the {\bf Cross Reference} page for \axiomType{Matrix}, click on {\bf Ancestors}, then on {\bf conditions} in the view panel. This page shows you that \axiomType{CoercibleTo(OutputForm)} and \axiomType{SetCategory} are ancestors of \axiomType{Matrix(R)} only if {\tt R} belongs to category \axiomType{SetCategory}. %********************************************************************* \endscroll \autobuttons \end{page} % % \newcommand{\ugBrowseGivingParametersTitle}{Giving Parameters to Constructors} \newcommand{\ugBrowseGivingParametersNumber}{14.2.4.} % % ===================================================================== \begin{page}{ugBrowseGivingParametersPage}{14.2.4. Giving Parameters to Constructors} % ===================================================================== \beginscroll %********************************************************************* Notice the input area at the bottom of the constructor page. If you leave this blank, then the information you get is for the domain constructor \axiomType{Matrix(R)}, that is, \axiomType{Matrix} for an arbitrary underlying domain {\tt R}. In general, however, the exports and other information {\it do} usually depend on the actual value of {\tt R}. For example, \axiomType{Matrix} exports the \axiomFun{inverse} operation only if the domain {\tt R} is a \axiomType{Field}. To see this, try this from the main constructor page: \indent{4} \beginitems \item[1. ] Enter {\tt Integer} into the input area at the bottom of the page. \item[2. ] Click on {\bf Operations}, producing a table of operations. Note the number of operation names that appear at the top of the page. \item[3. ] Click on \UpBitmap{} to return to the constructor page. \item[4. ] Use the \texht{\fbox{\bf Delete}}{{\bf Delete}} or \texht{\fbox{\bf Backspace}}{{\bf Backspace}} keys to erase {\tt Integer} from the input area. \item[5. ] Click on {\bf Operations} to produce a new table of operations. Look at the number of operations you get. This number is greater than what you had before. Find, for example, the operation \axiomFun{inverse}. \item[6. ] Click on {\bf inverse} to produce a page describing the operation \axiomFun{inverse}. At the bottom of the description, you notice that the {\bf Conditions} line says ``{\tt R} has \axiomType{Field}.'' This operation is {\it not} exported by \axiomType{Matrix(Integer)} since \axiomType{Integer} is not a \spadgloss{field}. Try putting the name of a domain such as \axiomType{Fraction Integer} (which is a field) into the input area, then clicking on {\bf Operations}. As you see, the operation \axiomFun{inverse} is exported. \enditems \indent{0} \endscroll \autobuttons \end{page} % % \newcommand{\ugBrowseMiscellaneousFeaturesTitle}{Miscellaneous Features of Browse} \newcommand{\ugBrowseMiscellaneousFeaturesNumber}{14.3.} % % ===================================================================== \begin{page}{ugBrowseMiscellaneousFeaturesPage}{14.3. Miscellaneous Features of Browse} % ===================================================================== \beginscroll \labelSpace{4pc} \beginmenu \menudownlink{{14.3.1. The Description Page for Operations}}{ugBrowseDescriptionPagePage} \menudownlink{{14.3.2. Views of Operations}}{ugBrowseViewsOfOperationsPage} \menudownlink{{14.3.3. Capitalization Convention}}{ugBrowseCapitalizationConventionPage} \endmenu \endscroll \autobuttons \end{page} % % \newcommand{\ugBrowseDescriptionPageTitle}{The Description Page for Operations} \newcommand{\ugBrowseDescriptionPageNumber}{14.3.1.} % % ===================================================================== \begin{page}{ugBrowseDescriptionPagePage}{14.3.1. The Description Page for Operations} % ===================================================================== \beginscroll From the constructor page of \axiomType{Matrix}, click on {\bf Operations} to bring up the table of operations for \axiomType{Matrix}. Find the operation {\bf inverse} in the table and click on it. This takes you to a page showing the documentation for this operation. Here is the significance of the headings you see. \subsubsection{Arguments} This lists each of the arguments of the operation in turn, paraphrasing the \spadgloss{signature} of the operation. As for signatures, a \axiomSyntax{\$} is used to designate {\em this domain}, that is, \axiomType{Matrix(R)}. \subsubsection{Returns} This describes the return value for the operation, analogous to the {\bf Arguments} part. \subsubsection{Origin} This tells you which domain or category explicitly exports the operation. In this example, the domain itself is the {\it Origin}. \subsubsection{Conditions} This tells you that the operation is exported by \axiomType{Matrix(R)} only if ``{\tt R} has \axiomType{Field},'' that is, ``{\tt R} is a member of category \axiomType{Field}.'' When no {\bf Conditions} part is given, the operation is exported for all values of {\tt R}. \subsubsection{Description} Here are the \axiomSyntax{++} comments that appear in the source code of its {\it Origin}, here \axiomType{Matrix}. You find these comments in the source code for \axiomType{Matrix}. Click on \UpBitmap{} to return to the table of operations. Click on {\bf map}. Here you find three different operations named \axiomFun{map}. This should not surprise you. Operations are identified by name and \spadgloss{signature}. There are three operations named \axiomFun{map}, each with different signatures. What you see is the {\it descriptions} view of the operations. If you like, select the button in the heading of one of these descriptions to get {\it only} that operation. \subsubsection{Where} This part qualifies domain parameters mentioned in the arguments to the operation. \endscroll \autobuttons \end{page} % % \newcommand{\ugBrowseViewsOfOperationsTitle}{Views of Operations} \newcommand{\ugBrowseViewsOfOperationsNumber}{14.3.2.} % % ===================================================================== \begin{page}{ugBrowseViewsOfOperationsPage}{14.3.2. Views of Operations} % ===================================================================== \beginscroll We suggest that you go to the constructor page for \axiomType{Matrix} and click on {\bf Operations} to bring up a table of operations with a {\it Views} panel at the bottom. \subsubsection{names} This view lists the names of the operations. Unlike constructors, however, there may be several operations with the same name. The heading for the page tells you the number of unique names and the number of distinct operations when these numbers are different. \subsubsection{filter} As for constructors, you can use this button to cut down the list of operations you are looking at. Enter, for example, {\tt m*} into the input area to the right of {\bf filter} then click on {\bf filter}. As usual, any logical expression is permitted. For example, use \begin{verbatim} *! or *? \end{verbatim} to get a list of destructive operations and predicates. \subsubsection{documentation} This gives you the most information: a detailed description of all the operations in the form you have seen before. Every other button summarizes these operations in some form. \subsubsection{signatures} This views the operations by showing their signatures. \subsubsection{parameters} This views the operations by their distinct syntactic forms with parameters. \subsubsection{origins} This organizes the operations according to the constructor that explicitly exports them. \subsubsection{conditions} This view organizes the operations into conditional and unconditional operations. \subsubsection{usage} This button is only available if your user-level is set to {\it %-% \HDindex{user-level}{ugBrowseViewsOfOperationsPage}{14.3.2.}{Views of Operations} development}. The {\bf usage} button produces a table of constructors that reference this operation.\footnote{\Language{} requires an especially long time to produce this table, so anticipate this when requesting this information.} \subsubsection{implementation} This button is only available if your user-level is set to {\it development}. %-% \HDindex{user-level}{ugBrowseViewsOfOperationsPage}{14.3.2.}{Views of Operations} If you enter values for all domain parameters on the constructor page, then the {\bf implementation} button appears in place of the {\bf conditions} button. This button tells you what domains or packages actually implement the various operations.\footnote{This button often takes a long time; expect a delay while you wait for an answer.} With your user-level set to {\it development}, we suggest you try this exercise. Return to the main constructor page for \axiomType{Matrix}, then enter {\tt Integer} into the input area at the bottom as the value of {\tt R}. Then click on {\bf Operations} to produce a table of operations. Note that the {\bf conditions} part of the {\it Views} table is replaced by {\bf implementation}. Click on {\bf implementation}. After some delay, you get a page describing what implements each of the matrix operations, organized by the various domains and packages. \subsubsection{generalize} This button only appears for an operation page of a constructor involving a unique operation name. From an operations page for \axiomType{Matrix}, select any operation name, say {\bf rank}. In the views panel, the {\bf filter} button is replaced by {\bf generalize}. Click on it! %% Replaced {\bf threshold} with 10 below. MGR 1995oct31 What you get is a description of all \Language{} operations named \axiomFun{rank}.\footnote{If there were more than 10 operations of the name, you get instead a page with a {\it Views} panel at the bottom and the message to {\bf Select a view below}. To get the descriptions of all these operations as mentioned above, select the {\bf description} button.} %See the discussion of {\bf threshold} in %\downlink{``\ugBrowseOptionsTitle''}{ugBrowseOptionsPage} in Section \ugBrowseOptionsNumber\ignore{ugBrowseOptions}.} %% Removed MGR 1995oct31 \subsubsection{all domains} This button only appears on an operation page resulting from a search from the front page of \Browse{} or from selecting {\bf generalize} from an operation page for a constructor. Note that the {\bf filter} button in the {\it Views} panel is replaced by {\bf all domains}. Click on it to produce a table of {\it all} domains or packages that export a \axiomFun{rank} operation. We note that this table specifically refers to all the \axiomFun{rank} operations shown in the preceding page. Return to the descriptions of all the \axiomFun{rank} operations and select one of them by clicking on the button in its heading. Select {\bf all domains}. As you see, you have a smaller table of constructors. When there is only one constructor, you get the constructor page for that constructor. \texht{\newpage}{} \endscroll \autobuttons \end{page} % % \newcommand{\ugBrowseCapitalizationConventionTitle}{Capitalization Convention} \newcommand{\ugBrowseCapitalizationConventionNumber}{14.3.3.} % % ===================================================================== \begin{page}{ugBrowseCapitalizationConventionPage}{14.3.3. Capitalization Convention} % ===================================================================== \beginscroll When entering search keys for constructors, you can use capital letters to search for abbreviations. For example, enter {\tt UTS} into the input area and click on {\bf Constructors}. Up comes a page describing \axiomType{UnivariateTaylorSeries} whose abbreviation is \axiomType{UTS}. Constructor abbreviations always have three or more capital letters. For short constructor names (six letters or less), abbreviations are not generally helpful as their abbreviation is typically the constructor name in capitals. For example, the abbreviation for \axiomType{Matrix} is \axiomType{MATRIX}. Abbreviations can also contain numbers. For example, \axiomType{POLY2} is the abbreviation for constructor \axiomType{PolynomialFunctions2}. For default packages, the abbreviation is the same as the abbreviation for the corresponding category with the ``\&'' replaced by ``-''. For example, for the category default package \aliascon{MatrixCategory\&}{MATCAT-} the abbreviation is \axiomType{MATCAT-} since the corresponding category \axiomType{MatrixCategory} has abbreviation \axiomType{MATCAT}. %% ********************************************************************* %\head{subsection}{Browse Options}{ugBrowseOptions} %% ********************************************************************* % %You can set two options for using \Browse{}: exposure and threshold. % %\labelSpace{2pc} %% ********************************************************************* %\subsubsection{Exposure} %% ********************************************************************* % %By default, the only constructors, operations, and attributes %shown by \Browse{} are those from \spadglossSee{exposed constructors}{expose}. %To change this, you can issue %\syscmdindex{set hyperdoc browse exposure} %\begin{verbatim} %)set hyperdoc browse exposure on %\end{verbatim} %After you make this setting, you will see %both exposed and unexposed constructs. %By definition, an operation or attribute is exposed only if it is %exported from an exposed constructor. %Unexposed items are generally marked by \Browse{} with an asterisk. %For more information on exposure, see \downlink{``\ugTypesExposeTitle''}{ugTypesExposePage} in Section \ugTypesExposeNumber\ignore{ugTypesExpose}. % %With this setting, try the following experiment. %Starting with the main \Browse{} page, enter {\tt *matrix*} into the %input area and click on {\bf Constructors}. %The result is the following table. %% This line should be texonly. MGR % %\begin{texonly} %\begin{figure}[htbp] %\begin{picture}(324,180)%(-54,0) %\hspace*{\baseLeftSkip}\special{psfile=../ps/h-consearch2.ps} %\end{picture} %\caption{Table of all constructors matching {\tt *matrix*} .} %\end{figure} %\end{texonly} % % %% ********************************************************************* %\subsubsection{Threshold} %% ********************************************************************* % %For General, Documentation or Complete searches, a summary is presented %of all matches. %When the number of items of a given kind is less than a number called %{\bf threshold}, \Language{} presents a table of names with the heading %for that kind. % %Also, when an operation name is chosen and there are less than {\bf %threshold} distinct operations, the operations are initially shown in %{\bf description} mode. % %The default value of {\bf threshold} is 10. %To change its value to say 5, issue %\syscmdindex{set hyperdoc browse threshold} %\begin{verbatim} %)set hyperdoc browse threshold 5 %\end{verbatim} %Notice that the headings in %the summary are active. %If you click on a heading, you bring up a separate page for those %entries. %% %% Above section removed by MGR, 1995oct30, as these two options do %% not exist. \endscroll \autobuttons \end{page} %