edu.wisc.cs.stego.lib
Class PPCTScanner
java.lang.Object
|
+--edu.wisc.cs.stego.Scanner
|
+--edu.wisc.cs.stego.lib.PPCTScanner
- public class PPCTScanner
- extends Scanner
This is a scanner which tries to locate a watermark encoded
with PPCTEncoder using Planted Plane Cubic Tree algorithm.
The scanner takes one input -- the size of the PPCT class
and tries to locate possible watermarks based on the input.
- See Also:
PPCTEncoder
,
PPCTLookup
Constructor Summary |
protected |
PPCTScanner(java.lang.String[] argv)
Protected constructor. |
Method Summary |
static Scanner |
buildScanner(java.lang.String[] args)
This method build a PPCTScanner object |
java.lang.String[] |
scanHeap(HeapProfile heap)
This method will scan the heap and try to locate the
watermark represented using PPCT encoding scheme |
static boolean |
traverse(HObject start,
java.util.HashSet cycle,
java.util.LinkedList sequence,
java.lang.String left,
java.lang.String right,
int max,
boolean isLeft)
This method tries to do a post order traverse starting from
the root node start and it checks the validity of the PPCT
tree it has built so far along the way. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
PPCTScanner
protected PPCTScanner(java.lang.String[] argv)
- Protected constructor. It requires one input, the catalan number.
Technically, it is not the catalan number C(n), it is n, which is
the number of nodes in the tree (not counting root and its direct
decendent.
buildScanner
public static Scanner buildScanner(java.lang.String[] args)
- This method build a PPCTScanner object
- Tags copied from class: Scanner
- Parameters:
params
- parameters for the initialization of the new Scanner object.- Returns:
- a newly constructed and initialized Scanner object.
- Throws:
- NoSuchMethodError - if this is not overridden by the subclass.
scanHeap
public java.lang.String[] scanHeap(HeapProfile heap)
- This method will scan the heap and try to locate the
watermark represented using PPCT encoding scheme
- Overrides:
- scanHeap in class Scanner
- Tags copied from class: Scanner
- Parameters:
hp
- a heap in which to search for possible watermarks.- Returns:
- an array of strings which are possible watermarks.
traverse
public static boolean traverse(HObject start,
java.util.HashSet cycle,
java.util.LinkedList sequence,
java.lang.String left,
java.lang.String right,
int max,
boolean isLeft)
- This method tries to do a post order traverse starting from
the root node start and it checks the validity of the PPCT
tree it has built so far along the way. Upon finish, sequence
may, or may not, contain a sequence representing a PPCT which
belongs to the class C(n)
- Parameters:
start
- first nodecycle
- all the leaves plus root node form a cyclesequence
- sequence representing the graphleft
- left noderight
- right nodecatalan
- catalan numberisLeft
- searching left or right, with respect to parent node