MCPcopy Create free account
hub / github.com/ImageEngine/cortex / intersection

Method intersection

src/IECore/PathMatcher.cpp:436–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436PathMatcher PathMatcher::intersection( const PathMatcher &paths ) const
437{
438 PathMatcher result = PathMatcher();
439 for( Iterator it = (*this).begin(); it != (*this).end(); ++it )
440 {
441 RawIterator rit = paths.find( *it );
442 if( rit == paths.end() )
443 {
444 it.prune();
445 }
446 else if( rit.exactMatch() )
447 {
448 result.addPath( *it );
449 }
450 }
451 return result;
452}
453
454bool PathMatcher::prune( const std::string &path )
455{

Callers 1

testIntersectionMethod · 0.95

Calls 6

PathMatcherFunction · 0.85
pruneMethod · 0.80
addPathMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45

Tested by 1

testIntersectionMethod · 0.76