edu.upenn.gloDB.parser
Class Operator

java.lang.Object
  extended by edu.upenn.gloDB.parser.Operator

public class Operator
extends java.lang.Object

Methods for processing the different types of operators.

 T1:  r-s    t-------u v---w  x-y      
  aa|------------------------------|bb 
    |012345678901234567890123456789|   
 T2:  a-b   c-d e-f g---h i-j          
 
The type of Operator:

Version:
$Id: Operator.java,v 1.1.2.22 2007/03/01 21:17:33 fisher Exp $

Constructor Summary
Operator()
           
 
Method Summary
static Track fxn_AND(Track left, Operation operation)
          AND : all F in T1 which also exists in T2.
static Track fxn_bAND(Track left, Operation operation)
          && (bAND) : all positions in T1 that overlap with positions in T2.
static Track fxn_bMINUS(Track left, Operation operation)
          bMINUS : all positions in T1 that don't exist in T2.
static Track fxn_bOR(Track left, Operation operation)
          OR : all F in T1 and T2.
static Track fxn_MINUS(Track left, Operation operation)
          MINUS : all F in T1 that don't overlap with F in T2.
static Track fxn_OR(Track left, Operation operation)
          OR : all F in T1 and T2.
static Track fxn_POS(Track left, Operation operation)
          POS : all contiguous F in T1 and T2, appropriately spaced For each T2 need to loop through all T1 (on same seq), until past range.
static Track fxn_sAND(Track left, Operation operation)
          sAND : all features in T1 which exactly overlap features in T2.
static Track fxn_sMINUS(Track left, Operation operation)
          sMINUS : all features in T1 that don't exactly overlap features in T2.
(package private) static java.lang.String getType(int type)
          Return the representative String for a type value.
(package private) static Track processOperation(Track left, Operation operation)
          The first argument 'left' is the set of Features on the left hand side of the operation, the second argument 'operation' contains both the operation type and the set of Features on the right hand side of the operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Operator

public Operator()
Method Detail

getType

static java.lang.String getType(int type)
Return the representative String for a type value.


processOperation

static Track processOperation(Track left,
                              Operation operation)
The first argument 'left' is the set of Features on the left hand side of the operation, the second argument 'operation' contains both the operation type and the set of Features on the right hand side of the operation.


fxn_POS

public static Track fxn_POS(Track left,
                            Operation operation)
POS : all contiguous F in T1 and T2, appropriately spaced For each T2 need to loop through all T1 (on same seq), until past range. Loop through T2 and if find match, then add T1 and T2, don't worry about repeatedly adding T1's but no need to ever test a T2 again once added -- only ever have to go through T2 once.

Notes:
can we make this more efficient by looping from end? Use different strategy for - and +? Consider that the Sets are sorted by their min values which means we can assume the T2's are incremental but we can't assume this about the T1's since we are concerned with the T1 max values but T1 is sorted by min values.

fxn_AND

public static Track fxn_AND(Track left,
                            Operation operation)
AND : all F in T1 which also exists in T2.


fxn_OR

public static Track fxn_OR(Track left,
                           Operation operation)
OR : all F in T1 and T2.


fxn_MINUS

public static Track fxn_MINUS(Track left,
                              Operation operation)
MINUS : all F in T1 that don't overlap with F in T2.


fxn_sAND

public static Track fxn_sAND(Track left,
                             Operation operation)
sAND : all features in T1 which exactly overlap features in T2.


fxn_sMINUS

public static Track fxn_sMINUS(Track left,
                               Operation operation)
sMINUS : all features in T1 that don't exactly overlap features in T2.


fxn_bOR

public static Track fxn_bOR(Track left,
                            Operation operation)
OR : all F in T1 and T2.


fxn_bAND

public static Track fxn_bAND(Track left,
                             Operation operation)
&& (bAND) : all positions in T1 that overlap with positions in T2.

Notes:
This will return only overlapping regions between 2 Features., This assumes that mergeContiguous() has already been run on each set of Features; that is, neither set contains contiguous Features.

fxn_bMINUS

public static Track fxn_bMINUS(Track left,
                               Operation operation)
bMINUS : all positions in T1 that don't exist in T2. This will return only overlapping regions between 2 Features.

Notes:
This assumes that mergeContiguous() has already been run on each set of Features; that is, neither set contains contiguous Features.



Copyright 2012 Stephen Fisher and Junhyong Kim, University of Pennsylvania. All Rights Reserved.