Unnamed: 0 int64 0 6.7k | func stringlengths 12 89.6k | target bool 2
classes | project stringlengths 45 151 |
|---|---|---|---|
3,000 | {
@Override
protected Person underlyingObjectToObject( Path path )
{
return new Person( path.endNode() );
}
}; | false | community_embedded-examples_src_main_java_org_neo4j_examples_socnet_Person.java |
3,001 | {
@Override
protected StatusUpdate underlyingObjectToObject( Path path )
{
return new StatusUpdate( path.endNode() );
}
}; | false | community_embedded-examples_src_main_java_org_neo4j_examples_socnet_Person.java |
3,002 | public class Person
{
static final String NAME = "name";
// START SNIPPET: the-node
private final Node underlyingNode;
Person( Node personNode )
{
this.underlyingNode = personNode;
}
protected Node getUnderlyingNode()
{
return underlyingNode;
}
// END SNIPPET:... | false | community_embedded-examples_src_main_java_org_neo4j_examples_socnet_Person.java |
3,003 | private class StatusUpdateComparator implements Comparator<PositionedIterator<StatusUpdate>> {
public int compare(PositionedIterator<StatusUpdate> a, PositionedIterator<StatusUpdate> b) {
return a.current().getDate().compareTo(b.current().getDate());
}
} | false | community_embedded-examples_src_main_java_org_neo4j_examples_socnet_FriendsStatusUpdateIterator.java |
3,004 | class FriendsStatusUpdateIterator implements Iterator<StatusUpdate> {
private ArrayList<PositionedIterator<StatusUpdate>> statuses = new ArrayList<PositionedIterator<StatusUpdate>>();
private StatusUpdateComparator comparator = new StatusUpdateComparator();
public FriendsStatusUpdateIterator( Person person... | false | community_embedded-examples_src_main_java_org_neo4j_examples_socnet_FriendsStatusUpdateIterator.java |
3,005 | @Path( "/helloworld" )
public class HelloWorldResource
{
private final GraphDatabaseService database;
public HelloWorldResource( @Context GraphDatabaseService database )
{
this.database = database;
}
@GET
@Produces( MediaType.TEXT_PLAIN )
@Path( "/{nodeId}" )
public Response he... | false | community_server-examples_src_main_java_org_neo4j_examples_server_unmanaged_HelloWorldResource.java |
3,006 | public class ShortestPath extends ServerPlugin
{
@Description( "Find the shortest path between two nodes." )
@PluginTarget( Node.class )
public Iterable<Path> shortestPath(
@Source Node source,
@Description( "The node to find the shortest path to." )
@Parameter( name ... | false | community_server-examples_src_main_java_org_neo4j_examples_server_plugins_ShortestPath.java |
3,007 | @Description( "An extension to the Neo4j Server for getting all nodes or relationships" )
public class GetAll extends ServerPlugin
{
@Name( "get_all_nodes" )
@Description( "Get all nodes from the Neo4j graph database" )
@PluginTarget( GraphDatabaseService.class )
public Iterable<Node> getAllNodes( @Sour... | false | community_server-examples_src_main_java_org_neo4j_examples_server_plugins_GetAll.java |
3,008 | @Description( "Performs a depth two traversal along all relationship types." )
public class DepthTwo extends ServerPlugin
{
@Description( "Traverse depth two and return the end nodes" )
@PluginTarget( Node.class )
public Iterable<Node> nodesOnDepthTwo( @Source Node node )
{
ArrayList<Node> nodes... | false | community_server-examples_src_main_java_org_neo4j_examples_server_plugins_DepthTwo.java |
3,009 | public class TraversalDefinition
{
public static final String DEPTH_FIRST = "depth first";
public static final String NODE = "node";
public static final String ALL = "all";
private String uniqueness = NODE;
private int maxDepth = 1;
private String returnFilter = ALL;
private String order = ... | false | community_server-examples_src_main_java_org_neo4j_examples_server_TraversalDefinition.java |
3,010 | public class ShortestPathDocIT extends AbstractPluginTestBase
{
private static final String SHORTEST_PATHS = "shortestPath";
protected String getDocumentationSectionName()
{
return "rest-api";
}
@Test
public void canFindExtension() throws Exception
{
long nodeId = helper.cr... | false | community_server-examples_src_test_java_org_neo4j_examples_server_ShortestPathDocIT.java |
3,011 | public class Relation
{
public static final String OUT = "out";
public static final String IN = "in";
public static final String BOTH = "both";
private String type;
private String direction;
public String toJsonCollection()
{
StringBuilder sb = new StringBuilder();
sb.append... | false | community_server-examples_src_main_java_org_neo4j_examples_server_Relation.java |
3,012 | public class GetAllDocIT extends AbstractPluginTestBase
{
private static final String GET_ALL_RELATIONSHIPS = "getAllRelationships";
private static final String GET_ALL_NODES = "get_all_nodes";
protected String getDocumentationSectionName()
{
return "rest-api";
}
@Test
public void ... | false | community_server-examples_src_test_java_org_neo4j_examples_server_GetAllDocIT.java |
3,013 | public class DepthTwoDocIT extends AbstractPluginTestBase
{
private static final String NODES_ON_DEPTH_TWO = "nodesOnDepthTwo";
private static final String RELATIONSHIPS_ON_DEPTH_TWO = "relationshipsOnDepthTwo";
private static final String PATHS_ON_DEPTH_TWO = "pathsOnDepthTwo";
protected String getDoc... | false | community_server-examples_src_test_java_org_neo4j_examples_server_DepthTwoDocIT.java |
3,014 | public class CreateSimpleGraph
{
private static final String SERVER_ROOT_URI = "http://localhost:7474/db/data/";
public static void main( String[] args ) throws URISyntaxException
{
checkDatabaseIsRunning();
// START SNIPPET: nodesAndProps
URI firstNode = createNode();
addP... | false | community_server-examples_src_main_java_org_neo4j_examples_server_CreateSimpleGraph.java |
3,015 | public class Matrix
{
public enum RelTypes implements RelationshipType
{
NEO_NODE,
KNOWS,
CODED_BY
}
private static final String MATRIX_DB = "target/matrix-db";
private GraphDatabaseService graphDb;
private long matrixNodeId;
public static void main( String[] args )... | false | community_embedded-examples_src_main_java_org_neo4j_examples_Matrix.java |
3,016 | public class ImpermanentGraphJavaDocTestBase extends AbstractJavaDocTestBase
{
@BeforeClass
public static void init()
{
db = new TestGraphDatabaseFactory().newImpermanentDatabaseBuilder().newGraphDatabase();
}
} | false | community_embedded-examples_src_test_java_org_neo4j_examples_ImpermanentGraphJavaDocTestBase.java |
3,017 | public class SocnetTest
{
private static final Random r = new Random( System.currentTimeMillis() );
private static final int nrOfPersons = 20;
private GraphDatabaseService graphDb;
private PersonRepository personRepository;
@Before
public void setup() throws Exception
{
graphDb = n... | false | community_embedded-examples_src_test_java_org_neo4j_examples_socnet_SocnetTest.java |
3,018 | {
{
add( new TestData(
"Start",
"SELECT * FROM `Person` WHERE name = 'Anakin'".replace(
"`", identifierQuoteString ),
"START person=node:Person(name = 'Anakin') RETURN person",
... | false | community_embedded-examples_src_main_java_org_neo4j_examples_CypherSql.java |
3,019 | {
@Override
public void run()
{
graphDb.shutdown();
}
} ); | false | community_embedded-examples_src_main_java_org_neo4j_examples_CalculateShortestPath.java |
3,020 | public class CalculateShortestPath
{
private static final String DB_PATH = "neo4j-shortest-path";
private static final String NAME_KEY = "name";
private static RelationshipType KNOWS = DynamicRelationshipType.withName( "KNOWS" );
private static GraphDatabaseService graphDb;
private static Index<Nod... | false | community_embedded-examples_src_main_java_org_neo4j_examples_CalculateShortestPath.java |
3,021 | public class AclExampleDocTest extends ImpermanentGraphJavaDocTestBase
{
/**
* This example gives a generic overview of an approach to handling Access Control Lists (ACLs) in graphs,
* and a simplified example with concrete queries.
*
* == Generic approach ==
*
* In many scenarios... | false | community_embedded-examples_src_test_java_org_neo4j_examples_AclExampleDocTest.java |
3,022 | public abstract class AbstractJavaDocTestBase implements GraphHolder
{
public @Rule
TestData<JavaTestDocsGenerator> gen = TestData.producedThrough( JavaTestDocsGenerator.PRODUCER );
public @Rule
TestData<Map<String, Node>> data = TestData.producedThrough( GraphDescription.createGraphFor( this, true ) )... | false | community_embedded-examples_src_test_java_org_neo4j_examples_AbstractJavaDocTestBase.java |
3,023 | private static abstract class Snapshot
{
final String filename;
Snapshot( String filename )
{
this.filename = filename;
}
@Override
public String toString()
{
return getClass().getSimpleName() + "[" + filename + "]";
}
... | false | manual_cypherdoc_src_main_java_org_neo4j_doc_cypherdoc_TestFailureException.java |
3,024 | private static class InMemorySnapshot extends Snapshot
{
private final byte[] bytes;
InMemorySnapshot( String filename, byte[] bytes )
{
super( filename );
this.bytes = bytes;
}
@Override
public Snapshot dump( File targetDir )
{
... | false | manual_cypherdoc_src_main_java_org_neo4j_doc_cypherdoc_TestFailureException.java |
3,025 | private static class DumpedSnapshot extends Snapshot
{
public DumpedSnapshot( String path )
{
super( path );
}
@Override
public Snapshot dump( File targetDir )
{
return this;
}
} | false | manual_cypherdoc_src_main_java_org_neo4j_doc_cypherdoc_TestFailureException.java |
3,026 | class TestFailureException extends RuntimeException
{
final Result result;
private List<Snapshot> snapshots = new ArrayList<>();
TestFailureException( Result result, List<String> failedTests )
{
super( message( failedTests ) );
this.result = result;
}
private static String mess... | false | manual_cypherdoc_src_main_java_org_neo4j_doc_cypherdoc_TestFailureException.java |
3,027 | class State
{
final ExecutionEngine engine;
final GraphDatabaseService database;
Result latestResult;
State( ExecutionEngine engine, GraphDatabaseService database )
{
this.engine = engine;
this.database = database;
}
} | false | manual_cypherdoc_src_main_java_org_neo4j_doc_cypherdoc_State.java |
3,028 | class Result
{
final String query;
final String text;
final String profile;
public Result( String query, ExecutionResult result )
{
this.query = query;
text = result.dumpToString();
String profileText;
try
{
profileText = result.executionPlanDescr... | false | manual_cypherdoc_src_main_java_org_neo4j_doc_cypherdoc_Result.java |
3,029 | public class OutputHelper
{
private static final String PASSTHROUGH_BLOCK = "++++";
static String passthroughMarker( String role, String htmlElement, String docbookElement )
{
StringBuilder sb = new StringBuilder( 64 );
sb.append( '<' )
.append( htmlElement )
... | false | manual_cypherdoc_src_main_java_org_neo4j_doc_cypherdoc_OutputHelper.java |
3,030 | public class Main
{
private static final String[] EXTENSIONS = new String[] { "asciidoc", "adoc" };
/**
* Transforms the given files or directories (searched recursively for
* .asciidoc or .adoc files). The output file name is based on the input
* file name (and the relative path if a directory ... | false | manual_cypherdoc_src_main_java_org_neo4j_doc_cypherdoc_Main.java |
3,031 | public class CypherDocTest
{
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Test
public void fullDocumentBlockParsing() throws IOException
{
String content = FileUtils.readFileToString( resourceFile( "/hello-world.asciidoc" ) );
List<Block> blocks = Cy... | false | manual_cypherdoc_src_test_java_org_neo4j_doc_cypherdoc_CypherDocTest.java |
3,032 | public final class CypherDoc
{
static final String EOL = System.getProperty( "line.separator" );
private CypherDoc()
{
}
/**
* Parse a string as CypherDoc-enhanced AsciiDoc.
*/
public static String parse( String input )
{
List<Block> blocks = parseBlocks( input );
... | false | manual_cypherdoc_src_main_java_org_neo4j_doc_cypherdoc_CypherDoc.java |
3,033 | CONSOLE
{
@Override
boolean isA( List<String> block )
{
return isACommentWith( block, "console" );
}
@Override
String process( Block block, State state )
{
return OutputHelper.passthroughMarker( "cypherdoc-console", "p", "simpara" ... | false | manual_cypherdoc_src_main_java_org_neo4j_doc_cypherdoc_BlockType.java |
3,034 | GRAPH
{
@Override
boolean isA( List<String> block )
{
return isACommentWith( block, "graph" );
}
@Override
String process( Block block, State state )
{
String first = block.lines.get( 0 );
String id = "";
if... | false | manual_cypherdoc_src_main_java_org_neo4j_doc_cypherdoc_BlockType.java |
3,035 | QUERY
{
@Override
boolean isA( List<String> block )
{
String first = block.get( 0 );
if ( first.charAt( 0 ) != '[' )
{
return false;
}
if ( first.contains( "source" ) && first.contains( "cypher" ) )
{... | false | manual_cypherdoc_src_main_java_org_neo4j_doc_cypherdoc_BlockType.java |
3,036 | TEST
{
@Override
String process( Block block, State state )
{
List<String> tests = block.lines.subList( 1, block.lines.size() - 1 );
String result = state.latestResult.text;
List<String> failures = new ArrayList<String>();
for ( String test... | false | manual_cypherdoc_src_main_java_org_neo4j_doc_cypherdoc_BlockType.java |
3,037 | TABLE
{
@Override
String process( Block block, State state )
{
return AsciidocHelper.createQueryResultSnippet( state.latestResult.text );
}
@Override
boolean isA( List<String> block )
{
return isACommentWith( block, "table" );
... | false | manual_cypherdoc_src_main_java_org_neo4j_doc_cypherdoc_BlockType.java |
3,038 | public class CypherSql
{
private static final int COLUMN_MAX_WIDTH = 25;
private static final String LINE_SEGMENT = new String(
new char[COLUMN_MAX_WIDTH] ).replace( '\0', '-' );
private static final String SPACE_SEGMENT = new String(
new char[COLUMN_MAX_WIDTH] ).replace( '\0', ' ' )... | false | community_embedded-examples_src_main_java_org_neo4j_examples_CypherSql.java |
3,039 | public static class TestData
{
public final String name;
public final String sql;
public final String cypher;
public final String[] matchStrings;
/**
* Create a sql/cypher test.
*
* @param name the name of the test
* @param sql the sq... | false | community_embedded-examples_src_main_java_org_neo4j_examples_CypherSql.java |
3,040 | class UniqueFactoryGetOrCreate extends GetOrCreate<UniqueFactory<Node>>
{
@Override
public Node getOrCreateUser( String username, GraphDatabaseService graphDb, UniqueFactory<Node> uniqueFactory )
{
return getOrCreateUserWithUniqueFactory( username, graphDb, uniqueFactory );
... | false | community_embedded-examples_src_test_java_org_neo4j_examples_GetOrCreateDocIT.java |
3,041 | public class CypherSqlDocIT extends ImpermanentGraphJavaDocTestBase
{
private static CypherSql cyperSql;
@BeforeClass
public static void setUpDbs() throws SQLException
{
cyperSql = new CypherSql(
new TestGraphDatabaseFactory().newImpermanentDatabase() );
cyperSql.createD... | false | community_embedded-examples_src_test_java_org_neo4j_examples_CypherSqlDocIT.java |
3,042 | abstract class ThreadRunner<D> implements Runnable
{
static final int NUM_USERS = 100;
final GetOrCreate<D> impl;
ThreadRunner( GetOrCreate<D> impl )
{
this.impl = impl;
}
abstract D createDependency();
@Override
public void run()
... | false | community_embedded-examples_src_test_java_org_neo4j_examples_GetOrCreateDocIT.java |
3,043 | class PessimisticGetOrCreate extends GetOrCreate<Node>
{
@Override
public Node getOrCreateUser( String username, GraphDatabaseService graphDb, Node lockNode )
{
return getOrCreateUserPessimistically( username, graphDb, lockNode );
}
} | false | community_embedded-examples_src_test_java_org_neo4j_examples_GetOrCreateDocIT.java |
3,044 | private static class GetOrCreateTask<D> extends Thread
{
private final GraphDatabaseService db;
private final int numUsers;
private final GetOrCreate<D> impl;
private final D dependency;
volatile List<Node> result;
volatile RuntimeException failure;
GetO... | false | community_embedded-examples_src_test_java_org_neo4j_examples_GetOrCreateDocIT.java |
3,045 | abstract class GetOrCreate<D>
{
abstract Node getOrCreateUser( String username, GraphDatabaseService graphDb, D dependency );
void assertUserExistsUniquely( GraphDatabaseService graphDb, Transaction tx, String username )
{
assertUserExistsUniquelyInGraphDb( graphDb, tx, user... | false | community_embedded-examples_src_test_java_org_neo4j_examples_GetOrCreateDocIT.java |
3,046 | class CypherGetOrCreate extends GetOrCreate<ExecutionEngine>
{
@Override
public Node getOrCreateUser( String username, GraphDatabaseService graphDb, ExecutionEngine engine )
{
return getOrCreateWithCypher( username, graphDb, engine );
}
} | false | community_embedded-examples_src_test_java_org_neo4j_examples_GetOrCreateDocIT.java |
3,047 | {
@Override
protected void initialize( Node created, Map<String, Object> properties )
{
created.addLabel( DynamicLabel.label( "User" ) );
created.setProperty( "name", properties.get( "name" ) );
}
... | false | community_embedded-examples_src_test_java_org_neo4j_examples_GetOrCreateDocIT.java |
3,048 | new ThreadRunner<ExecutionEngine>( new CypherGetOrCreate() ) {
@Override
ExecutionEngine createDependency()
{
return createExecutionEngineAndConstraint( graphdb() );
}
}.run(); | false | community_embedded-examples_src_test_java_org_neo4j_examples_GetOrCreateDocIT.java |
3,049 | new ThreadRunner<UniqueFactory<Node>>( new UniqueFactoryGetOrCreate() ) {
@Override
UniqueFactory<Node> createDependency()
{
return createUniqueFactory( graphdb() );
}
}.run(); | false | community_embedded-examples_src_test_java_org_neo4j_examples_GetOrCreateDocIT.java |
3,050 | {
@Override
Node createDependency()
{
return createLockNode( graphdb() );
}
}.run(); | false | community_embedded-examples_src_test_java_org_neo4j_examples_GetOrCreateDocIT.java |
3,051 | public class GetOrCreateDocIT extends AbstractJavaDocTestBase
{
@BeforeClass
public static void init()
{
db = new GraphDatabaseFactory().newEmbeddedDatabase(
TargetDirectory.forTest( GetOrCreateDocIT.class ).makeGraphDbDir().getAbsolutePath()
);
}
abstract class... | false | community_embedded-examples_src_test_java_org_neo4j_examples_GetOrCreateDocIT.java |
3,052 | public class EmbeddedNeo4jWithNewIndexingDocTest
{
@Test
public void justExecuteIt()
{
EmbeddedNeo4jWithNewIndexing.main( null );
}
} | false | community_embedded-examples_src_test_java_org_neo4j_examples_EmbeddedNeo4jWithNewIndexingDocTest.java |
3,053 | public class EmbeddedNeo4jWithNewIndexing
{
private static final String DB_PATH = "target/neo4j-store-with-new-indexing";
public static void main( final String[] args )
{
System.out.println( "Starting database ..." );
// START SNIPPET: startDb
GraphDatabaseService graphDb = new Gra... | false | community_embedded-examples_src_main_java_org_neo4j_examples_EmbeddedNeo4jWithNewIndexing.java |
3,054 | public class EmbeddedNeo4jWithIndexingDocTest
{
@Test
public void justExecuteIt()
{
EmbeddedNeo4jWithIndexing.main( null );
}
} | false | community_embedded-examples_src_test_java_org_neo4j_examples_EmbeddedNeo4jWithIndexingDocTest.java |
3,055 | {
@Override
public void run()
{
shutdown();
}
} ); | false | community_embedded-examples_src_main_java_org_neo4j_examples_EmbeddedNeo4jWithIndexing.java |
3,056 | public class EmbeddedNeo4jWithIndexing
{
private static final String DB_PATH = "target/neo4j-store";
private static final String USERNAME_KEY = "username";
private static GraphDatabaseService graphDb;
private static Index<Node> nodeIndex;
public static void main( final String[] args )
{
... | false | community_embedded-examples_src_main_java_org_neo4j_examples_EmbeddedNeo4jWithIndexing.java |
3,057 | public class EmbeddedNeo4jDocTest
{
private static EmbeddedNeo4j hello;
private static JavaDocsGenerator gen;
@BeforeClass
public static void setUpBeforeClass() throws Exception
{
hello = new EmbeddedNeo4j();
gen = new JavaDocsGenerator( "hello-world-java", "dev" );
}
@Test... | false | community_embedded-examples_src_test_java_org_neo4j_examples_EmbeddedNeo4jDocTest.java |
3,058 | {
@Override
public void run()
{
graphDb.shutdown();
}
} ); | false | community_embedded-examples_src_main_java_org_neo4j_examples_EmbeddedNeo4j.java |
3,059 | public class EmbeddedNeo4j
{
private static final String DB_PATH = "target/neo4j-hello-db";
public String greeting;
// START SNIPPET: vars
GraphDatabaseService graphDb;
Node firstNode;
Node secondNode;
Relationship relationship;
// END SNIPPET: vars
// START SNIPPET: createReltype... | false | community_embedded-examples_src_main_java_org_neo4j_examples_EmbeddedNeo4j.java |
3,060 | public class DocumentationDocTest extends ImpermanentGraphJavaDocTestBase
{
/**
* This is a sample documentation test, demonstrating different ways of
* bringing code and other artifacts into Asciidoc form. The title of the
* generated document is determined from the method name, replacing "+_+" wit... | false | community_embedded-examples_src_test_java_org_neo4j_examples_DocumentationDocTest.java |
3,061 | {
@Override
protected Person underlyingObjectToObject( Relationship personRel )
{
return new Person( personRel.getEndNode() );
}
}; | false | community_embedded-examples_src_main_java_org_neo4j_examples_socnet_PersonRepository.java |
3,062 | public class StatusUpdate
{
private final Node underlyingNode;
static final String TEXT = "TEXT";
static final String DATE = "DATE";
public StatusUpdate( Node underlyingNode )
{
this.underlyingNode = underlyingNode;
}
public Node getUnderlyingNode()
{
return underlying... | false | community_embedded-examples_src_main_java_org_neo4j_examples_socnet_StatusUpdate.java |
3,063 | {
@Override
public void close() throws IOException, IndexEntryConflictException
{
if ( IndexUpdateMode.ONLINE == mode )
{
updatesCommitted.addAll( updates );
}
... | false | community_kernel_src_test_java_org_neo4j_kernel_impl_api_index_IndexCRUDIT.java |
3,064 | public class ExactDepthPathFinder extends TraversalPathFinder
{
private final PathExpander expander;
private final int onDepth;
private final int startThreshold;
public ExactDepthPathFinder( RelationshipExpander expander, int onDepth,
int startThreshold )
{
this( toPathExpander(... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_ExactDepthPathFinder.java |
3,065 | {
@Override
public Iterator<WeightedPath> iterator()
{
return new StopAfterWeightIterator( traverser.iterator(), costEvaluator );
}
}; | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_Dijkstra.java |
3,066 | public class Dijkstra implements PathFinder<WeightedPath>
{
private static final TraversalDescription TRAVERSAL = traversal().uniqueness( Uniqueness.NONE );
private final PathExpander expander;
private final InitialBranchState stateFactory;
private final CostEvaluator<Double> costEvaluator;
private... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_Dijkstra.java |
3,067 | public class AllSimplePaths extends AllPaths
{
public AllSimplePaths( int maxDepth, RelationshipExpander expander )
{
super( maxDepth, expander );
}
public AllSimplePaths( int maxDepth, PathExpander expander )
{
super( maxDepth, expander );
}
@Override
protected Uni... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_AllSimplePaths.java |
3,068 | public class AllPaths extends TraversalPathFinder
{
private final PathExpander expander;
private final int maxDepth;
private final TraversalDescription base;
public AllPaths( int maxDepth, RelationshipExpander expander )
{
this( maxDepth, toPathExpander( expander ) );
}
public AllP... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_AllPaths.java |
3,069 | private static class Visit
{
private double wayLength; // accumulated cost to get here (g)
private double estimate; // heuristic estimate of cost to reach end (h)
private long cameFromRelationship;
private boolean visited;
private boolean next;
Visit( long cameFr... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_AStar.java |
3,070 | private static class Metadata implements TraversalMetadata
{
private int rels;
private int paths;
@Override
public int getNumberOfPathsReturned()
{
return paths;
}
@Override
public int getNumberOfRelationshipsTraversed()
{
... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_AStar.java |
3,071 | private class AStarIterator extends PrefetchingIterator<Node> implements Path
{
private final Node start;
private final Node end;
private Node lastNode;
private final PriorityMap<Node, Node, Double> nextPrioritizedNodes =
PriorityMap.<Node, Double>withSelfKeyNatur... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_AStar.java |
3,072 | public class AStar implements PathFinder<WeightedPath>
{
private final PathExpander<?> expander;
private final CostEvaluator<Double> lengthEvaluator;
private final EstimateEvaluator<Double> estimateEvaluator;
private Metadata lastMetadata;
public AStar( RelationshipExpander expander,
Co... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_AStar.java |
3,073 | public class StressCentrality<ShortestPathCostType> extends
ShortestPathBasedCentrality<Double,ShortestPathCostType>
{
protected Double globalFactor;
/**
* Default constructor.
* @param singleSourceShortestPath
* Underlying singleSourceShortestPath.
* @param nodeSet
* ... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_centrality_StressCentrality.java |
3,074 | public abstract class ShortestPathBasedCentrality<CentralityType,ShortestPathCostType>
{
protected SingleSourceShortestPath<ShortestPathCostType> singleSourceShortestPath;
protected CostAccumulator<CentralityType> centralityAccumulator;
protected CentralityType zeroValue;
protected Set<Node> nodeSet;
... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_centrality_ShortestPathBasedCentrality.java |
3,075 | public class ParallellCentralityCalculation<ShortestPathCostType>
{
protected SingleSourceShortestPath<ShortestPathCostType> singleSourceShortestPath;
protected Set<Node> nodeSet;
List<ShortestPathBasedCentrality<?,ShortestPathCostType>> calculations = new LinkedList<ShortestPathBasedCentrality<?,ShortestPa... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_centrality_ParallellCentralityCalculation.java |
3,076 | public class NetworkRadius<ShortestPathCostType> extends
ShortestPathBasedCentrality<ShortestPathCostType,ShortestPathCostType>
{
Comparator<ShortestPathCostType> distanceComparator;
// Underlying eccentricity computation
protected Eccentricity<ShortestPathCostType> eccentricity;
protected ShortestP... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_centrality_NetworkRadius.java |
3,077 | public class NetworkDiameter<ShortestPathCostType> extends
ShortestPathBasedCentrality<ShortestPathCostType,ShortestPathCostType>
{
Comparator<ShortestPathCostType> distanceComparator;
// Underlying eccentricity computation
protected Eccentricity<ShortestPathCostType> eccentricity;
protected Shortes... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_centrality_NetworkDiameter.java |
3,078 | public class EigenvectorCentralityPower implements EigenvectorCentrality
{
protected Direction relationDirection;
protected CostEvaluator<Double> costEvaluator;
protected Set<Node> nodeSet;
protected Set<Relationship> relationshipSet;
protected double precision = 0.001;
protected boolean doneCal... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_centrality_EigenvectorCentralityPower.java |
3,079 | public class EigenvectorCentralityArnoldi implements EigenvectorCentrality
{
protected Direction relationDirection;
protected CostEvaluator<Double> costEvaluator;
protected Set<Node> nodeSet;
protected Set<Relationship> relationshipSet;
protected double precision = 0.001;
protected boolean doneC... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_centrality_EigenvectorCentralityArnoldi.java |
3,080 | public class Eccentricity<ShortestPathCostType> extends
ShortestPathBasedCentrality<ShortestPathCostType,ShortestPathCostType>
{
Comparator<ShortestPathCostType> distanceComparator;
/**
* Default constructor.
* @param singleSourceShortestPath
* Underlying singleSourceShortestPath.... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_centrality_Eccentricity.java |
3,081 | public class ClosenessCentrality<ShortestPathCostType> extends
ShortestPathBasedCentrality<ShortestPathCostType,ShortestPathCostType>
{
CostDivider<ShortestPathCostType> centralityDivider;
/**
* Default constructor.
* @param singleSourceShortestPath
* Underlying singleSourceShorte... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_centrality_ClosenessCentrality.java |
3,082 | public class BetweennessCentrality<ShortestPathCostType> extends
ShortestPathBasedCentrality<Double,ShortestPathCostType>
{
protected Double globalFactor;
/**
* Default constructor.
* @param singleSourceShortestPath
* Underlying singleSourceShortestPath.
* @param nodeSet
... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_centrality_BetweennessCentrality.java |
3,083 | public class AncestorsUtil {
/**
*
* @param nodeSet Set of nodes for which the LCA will be found.
* @return The LCA node if there's one, null otherwise.
*/
public static Node lowestCommonAncestor(List<Node> nodeSet,
RelationshipExpander expander) {
Node lowerCommonAnce... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_ancestor_AncestorsUtil.java |
3,084 | private static class SelectorFactory extends BestFirstSelectorFactory<Double, Double>
{
private final CostEvaluator<Double> evaluator;
SelectorFactory( boolean forMultiplePaths, CostEvaluator<Double> evaluator )
{
super( forMultiplePaths );
this.evaluator = evalu... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_Dijkstra.java |
3,085 | {
public BranchSelector create( TraversalBranch startSource, PathExpander expander )
{
return new LiteDepthFirstSelector( startSource,
startThreshold, expander );
}
} ); | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_ExactDepthPathFinder.java |
3,086 | class StressTest extends StressCentrality<Double>
{
public StressTest(
SingleSourceShortestPath<Double> singleSourceShortestPath,
Set<Node> nodeSet )
{
super( singleSourceShortestPath, nodeSet );
}
public void test()
{
// a... | false | community_graph-algo_src_test_java_org_neo4j_graphalgo_centrality_StressCentralityTest.java |
3,087 | public class ShortestPath implements PathFinder<Path>
{
private final int maxDepth;
private final int maxResultCount;
private final PathExpander expander;
private final HitDecider hitDecider;
private Metadata lastMetadata;
/**
* Constructs a new shortest path algorithm.
* @param maxDe... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_ShortestPath.java |
3,088 | public class TraversalShortestPath extends TraversalPathFinder
{
private final PathExpander expander;
private final int maxDepth;
private final Integer maxResultCount;
public TraversalShortestPath( RelationshipExpander expander, int maxDepth )
{
this( toPathExpander( expander ), maxDepth );... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_TraversalShortestPath.java |
3,089 | public abstract class TraversalPathFinder implements PathFinder<Path>
{
private Traverser lastTraverser;
@Override
public Path findSinglePath( Node start, Node end )
{
return firstOrNull( findAllPaths( start, end ) );
}
protected Integer maxResultCount()
{
return nu... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_TraversalPathFinder.java |
3,090 | private class SelectorFactory extends BestFirstSelectorFactory<PositionData, Double>
{
private final Node end;
SelectorFactory( Node end, boolean forMultiplePaths )
{
super( forMultiplePaths );
this.end = end;
}
@Override
protected Positi... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_TraversalAStar.java |
3,091 | private static class PositionData implements Comparable<PositionData>
{
private final double wayLengthG;
private final double estimateH;
public PositionData( double wayLengthG, double estimateH )
{
this.wayLengthG = wayLengthG;
this.estimateH = estimateH;... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_TraversalAStar.java |
3,092 | {
@Override
public Iterator<WeightedPath> iterator()
{
return new StopAfterWeightIterator( lastTraverser.iterator(), costEvaluator );
}
}; | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_TraversalAStar.java |
3,093 | public class TraversalAStar implements PathFinder<WeightedPath>
{
private final TraversalDescription traversalDescription;
private final CostEvaluator<Double> costEvaluator;
private Traverser lastTraverser;
private final EstimateEvaluator<Double> estimateEvaluator;
@SuppressWarnings( "unchecked" )... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_TraversalAStar.java |
3,094 | private static class PathData
{
private final LinkedList<Relationship> rels;
private final Node node;
PathData( Node node, LinkedList<Relationship> rels )
{
this.rels = rels;
this.node = node;
}
} | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_ShortestPath.java |
3,095 | private static class MutableInteger
{
private static final int NULL = -1;
private int value;
MutableInteger( int initialValue )
{
this.value = initialValue;
}
} | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_ShortestPath.java |
3,096 | private static class MutableBoolean
{
private boolean value;
} | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_ShortestPath.java |
3,097 | private static class Metadata implements TraversalMetadata
{
private int rels;
private int paths;
@Override
public int getNumberOfPathsReturned()
{
return paths;
}
@Override
public int getNumberOfRelationshipsTraversed... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_ShortestPath.java |
3,098 | private static class LevelData
{
private long[] relsToHere;
private int depth;
LevelData( Relationship relToHere, int depth )
{
if ( relToHere != null )
{
addRel( relToHere );
}
this.depth = depth;
}... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_ShortestPath.java |
3,099 | private static class Hits
{
private Map<Integer, Collection<Hit>> hits =
new HashMap<Integer, Collection<Hit>>();
private int lowestDepth;
private int totalHitCount;
int add( Hit hit, int atDepth )
{
Collection<Hit> depthHits = hits.get( a... | false | community_graph-algo_src_main_java_org_neo4j_graphalgo_impl_path_ShortestPath.java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.