|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--lu.cs.co.graph.Graph
|
+--lu.cs.co.graph.Book
Constructors for undirected graphs based on a work of literature. The vertices represent characters that appear in well-known novels, or chapters in these novels. Edges join characters to the chapters they appear in, or to other characters encountered in the same chapter.
The graph can be based on one of five classics:
| Abbreviation | Title | Author |
|---|---|---|
| anna | Anna Karenina | Tolstoy |
| david8 | David Copperfield | Dickens |
| homer | The Iliad | Homer |
| huck | Huckleberry Finn | Twain |
| jean8 | Les Misèrables | Hugo |
| Fields inherited from class lu.cs.co.graph.Graph |
m,
n,
name |
| Constructor Summary | |
Book(String ttl)
All encounters between characters in a given book. |
|
Book(String ttl,
int num)
Encounters between the most common characters in a given book. |
|
Book(String ttl,
int num,
int skip)
Encounters between some of the more common characters in a given book. |
|
Book(String ttl,
int num,
int skip,
int first,
int last,
int in,
int out,
boolean bip,
long sd)
General character-character or character-chapter relations in a given book. |
|
| 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 |
public Book(String ttl)
ttl - abbreviated title of the given book, for example "anna" or "huck"
public Book(String ttl,
int num)
ttl - abbreviated title of the given book, for example "anna" or "huck"num - number of characters to be included. If this value is
zero or exceeds the number of characters appearing in the book,
the maximal value is substituted
public Book(String ttl,
int num,
int skip)
ttl - abbreviated title of the given book, for example "anna" or "huck"num - number of characters to be included. If this value is
zero or exceeds the number of characters appearing in the book,
the maximal value is substitutedskip - the number of characters to be skipped
public Book(String ttl,
int num,
int skip,
int first,
int last,
int in,
int out,
boolean bip,
long sd)
A range of chapters in the book can be selected by specifying the last and first chapters to be included.
Characters are selected for inclusion based on the value
in * numChapsIn + out * numChapsOutwhere numChapsIn is the number of chapters (in the selected range) in which the character appears, and numChapsOut is the number of appearances in other chapters. In and out are two given paramters of absolute value at most 1000000. For example,
Finally, a bipartite graph can be constructed between characters and the chapters in which they appear.
ttl - abbreviated title of the given book, for example "anna" or "huck"num - number of characters to be included. If this value is
zero or exceeds the number of characters appearing in the book,
the maximal value is substitutedskip - the number of characters to be skippedfirst - the first chapter to be includedlast - the last chapter to be includedin - the in-weight (see above)out - the out-weight (see above)bip - if true, constructs a bipartite character-chapter graphseed - the seed used in all random choices
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||