lu.cs.co.graph
Class Roget

java.lang.Object
  |
  +--lu.cs.co.graph.Graph
        |
        +--lu.cs.co.graph.Roget

public class Roget
extends Graph

Constructors for graphs based on Roget's Thesaurus. Each vertex of such a graph corresponds to one of the 1022 categories in the 1879 edition of Peter Mark Roget's Thesaurus of English Words and Phrases, edited by John Lewis Roget. A directed Edge goes from one category to another if Roget gave a reference to the latter among the words and phrases of the former, or if the two categories were directly related to each other by their positions in Roget's book. For example, the vertex for category 312 (`ascent') has arcs to the vertices for categories 224 (`obliquity') and 316 (`leap') because Roget gave explicit cross-references from 312 to 224 and 316, and because category 312 was implicitly paired with 313 in his scheme.


Fields inherited from class lu.cs.co.graph.Graph
m, n, name
 
Constructor Summary
Roget()
          The graph corresponding to all cross-references in Roget's Thesaurus.
Roget(int numCatergories, int minDistance, int prob, long seed)
          A graph with a specified number of random categrories, and a random selection of edges that between categories that are sufficiently unrelated.
Roget(int numCatergories, int prob, long seed)
          A graph with a specified number of random categories, and a random selection of edges.
Roget(int numCategories, long seed)
          A graph with a specified number of random categories.
 
Methods inherited from class lu.cs.co.graph.Graph
degree, edges, findByName, getAdjecencyMatrix, getDistanceMatrix, getEdge, getIndex, getVertex, getVertex, hasEdge, incident, incoming, indegree, index, isDirected, main, outdegree, outgoing, parseGraph, toString, vertices
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Roget

public Roget()
The graph corresponding to all cross-references in Roget's Thesaurus.

Roget

public Roget(int numCategories,
             long seed)
A graph with a specified number of random categories.
Parameters:
numCategories - the number of categories. If numCategories exceeds 1022 or is zero, the value 1022 is substituted.
seed - the seed to be used in all random choices
See Also:
java.util.Random

Roget

public Roget(int numCatergories,
             int prob,
             long seed)
A graph with a specified number of random categories, and a random selection of edges. This provides a way to obtain sparser graphs.
Parameters:
numCategories - the number of categories. If numCategories exceeds 1022 or is zero, the value 1022 is substituted.
prob - if prob>0, edges that would ordinarily be included in the graph are rejected with probability prob/65536
seed - the seed to be used in all random choices
See Also:
java.util.Random

Roget

public Roget(int numCatergories,
             int minDistance,
             int prob,
             long seed)
A graph with a specified number of random categrories, and a random selection of edges that between categories that are sufficiently unrelated.
Parameters:
numCategories - the number of categories. If numCategories exceeds 1022 or is zero, the value 1022 is substituted.
minDistance - An edge will be omitted if it connects categories whose numbers differ by less than minDistance. For example, if minDistance>0, the edge between categories 312 and 313 will not be included. (Roget sometimes formed clusters of three interrelated categories; to avoid cross-references within such clusters, you can set minDistance=3.)
prob - if prob≥0, edges that would ordinarily be included in the graph are rejected with probability prob/65536
seed - the seed to be used in all random choices
See Also:
java.util.Random