|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectarules.TrActSet
public class TrActSet
Class for a set of transactions.
Field Summary | |
---|---|
protected int |
cnt
the current number of transactions |
protected util.IdMap |
iset
the underlying item set |
protected int |
max
the maximal size of a transaction |
protected int[][] |
tracts
the set of transactions |
Constructor Summary | |
---|---|
TrActSet()
Create an empty set of transactions. |
|
TrActSet(util.IdMap iset)
Create an empty set of transactions. |
Method Summary | |
---|---|
int |
addTrAct(int[] tract)
Add a transaction. |
java.lang.String |
getItemName(int i)
Get the name of an item. |
util.IdMap |
getItemSet()
Get the underlying item set. |
int |
getMaxSize()
Get the maximal size of a transaction. |
int[] |
getTrAct(int i)
Get a transaction. |
int |
getTrActCount()
Get the number of transactions. |
static void |
main(java.lang.String[] args)
Main function for testing some basic functionality. |
static int[] |
parseTrAct(util.IdMap iset,
util.TableReader reader)
Parse a transaction. |
static TrActSet |
parseTrActSet(util.IdMap iset,
util.TableReader reader)
Parse a set of transactions. |
void |
write(util.TableWriter writer)
Write a set of transactions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected util.IdMap iset
protected int[][] tracts
protected int cnt
protected int max
Constructor Detail |
---|
public TrActSet()
public TrActSet(util.IdMap iset)
iset
- the underlying item setMethod Detail |
---|
public util.IdMap getItemSet()
public java.lang.String getItemName(int i)
i
public int getTrActCount()
public int[] getTrAct(int i)
i
- the index of the transaction
i
public int addTrAct(int[] tract)
tract
- the transaction to add
public int getMaxSize()
public void write(util.TableWriter writer) throws java.io.IOException
writer
- the table writer to write to
java.io.IOException
- if a write error occurspublic static int[] parseTrAct(util.IdMap iset, util.TableReader reader) throws java.io.IOException
iset
- the underlying item setreader
- the table reader to read from
java.io.IOException
- if a read error occurspublic static TrActSet parseTrActSet(util.IdMap iset, util.TableReader reader) throws java.io.IOException
iset
- the underlying item setreader
- the table reader to read from
java.io.IOException
- if a read error occurspublic static void main(java.lang.String[] args)
It is tried to parse the file that is given as the first command line argument as a set of transactions.
args
- the command line arguments
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |