congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IndexedElementGraph
Code IndexAdd Tabnine to your IDE (free)

How to use
IndexedElementGraph
in
cascading.flow.planner.iso.finder

Best Java code snippets using cascading.flow.planner.iso.finder.IndexedElementGraph (Showing top 8 results out of 315)

origin: cwensel/cascading

private void debugCompatibleEdges( Collection<Scope> results, int v1, int v2, List<ScopeExpression> matchers )
 {
 for( Scope result : results )
  {
  FlowElement lhs = elementGraph.getDelegate().getEdgeSource( result );
  int lhsIndex = elementGraph.getIndex( lhs );
  FlowElement rhs = elementGraph.getDelegate().getEdgeTarget( result );
  int rhsIndex = elementGraph.getIndex( rhs );
  LOG.debug( "compatible edge: {}:{} -> {}:{}, having: {}", lhsIndex, lhs, rhsIndex, rhs, result.printSimple() );
  }
 for( ScopeExpression matcher : matchers )
  LOG.debug( " - {} -> {} matcher: {}", v1, v2, matcher );
 }
origin: cwensel/cascading

public FlowElement getElementNode( int vertex )
 {
 return elementGraph.getVertex( vertex );
 }
origin: cwensel/cascading

  if( !elementGraph.containsEdge( node2, other2 ) || !areCompatibleEdges( node1, other1, node2, other2 ) )
   return false;
  if( !elementGraph.containsEdge( other2, node2 ) || !areCompatibleEdges( other1, node1, other2, node2 ) )
   return false;
for( int other2 : elementGraph.getSuccessors( node2 ) )
for( int other2 : elementGraph.getPredecessors( node2 ) )
origin: cwensel/cascading

 in2[ node2 ] = 0;
for( int other : elementGraph.getPredecessors( node2 ) )
 out2[ node2 ] = 0;
for( int other : elementGraph.getSuccessors( node2 ) )
origin: cwensel/cascading

protected boolean areCompatibleEdges( int v1, int v2, int v3, int v4 )
 {
 List<ScopeExpression> matchers = matchGraph.getAllEdgesList( v1, v2 );
 // if there is any edge between the nodes, capture all and return true
 if( matchers.size() == 1 && matchers.get( 0 ).acceptsAll() )
  {
  if( LOG.isDebugEnabled() )
   debugCompatibleEdges( elementGraph.getAllEdgesList( v3, v4 ), v1, v2, matchers );
  return true;
  }
 List<Scope> scopes = elementGraph.getAllEdgesList( v3, v4 );
 Collection<Scope> results = areCompatibleEdges( plannerContext, elementGraph.getElementGraph(), matchers, scopes );
 if( LOG.isDebugEnabled() && results != null )
  debugCompatibleEdges( results, v1, v2, matchers );
 return results != null;
 }
origin: cwensel/cascading

private boolean areCompatibleNodes( int node1, int node2 )
 {
 Expression expression = matchGraph.getVertex( node1 );
 FlowElement flowElement = elementGraph.getVertex( node2 );
 boolean result;
 if( ( (ElementExpression) expression ).getCapture() == ElementCapture.Primary &&
  !finderContext.getRequiredElements().isEmpty() )
  result = finderContext.isRequired( flowElement );
 else if( finderContext.isExcluded( flowElement ) || finderContext.isIgnored( flowElement ) )
  result = false;
 else
  result = expression.applies( plannerContext, elementGraph.getElementGraph(), flowElement );
 if( LOG.isDebugEnabled() && result )
  LOG.debug( "compatible nodes: {}:{} matched {}:{}", node1, expression, node2, flowElement );
 return result;
 }
origin: cwensel/cascading

State( FinderContext finderContext, PlannerContext plannerContext, SearchOrder searchOrder, DirectedGraph<ElementExpression, ScopeExpression> matchGraph, ElementGraph elementGraph )
 {
 this.finderContext = finderContext;
 this.plannerContext = plannerContext;
 this.matchGraph = new IndexedMatchGraph( matchGraph );
 this.elementGraph = new IndexedElementGraph( searchOrder, elementGraph );
 n1 = matchGraph.vertexSet().size();
 n2 = elementGraph.vertexSet().size();
 order = null;
 coreLen = 0;
 origCoreLen = 0;
 t1bothLen = 0;
 t1inLen = 0;
 t1outLen = 0;
 t2bothLen = 0;
 t2inLen = 0;
 t2outLen = 0;
 addedNode1 = NULL_NODE;
 core1 = new int[ n1 ];
 core2 = new int[ n2 ];
 in1 = new int[ n1 ];
 in2 = new int[ n2 ];
 out1 = new int[ n1 ];
 out2 = new int[ n2 ];
 Arrays.fill( core1, NULL_NODE );
 Arrays.fill( core2, NULL_NODE );
 }
origin: cwensel/cascading

for( int other : elementGraph.getPredecessors( node2 ) )
for( int other : elementGraph.getSuccessors( node2 ) )
cascading.flow.planner.iso.finderIndexedElementGraph

Most used methods

  • <init>
  • containsEdge
  • getAllEdgesList
  • getDelegate
  • getElementGraph
  • getIndex
  • getPredecessors
  • getSuccessors
  • getVertex

Popular in Java

  • Making http requests using okhttp
  • runOnUiThread (Activity)
  • getExternalFilesDir (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now