use of au.gov.asd.tac.constellation.graph.StoreGraph in project constellation by constellation-app.
the class DegreeCentralityPluginNGTest method setUpMethod.
@BeforeMethod
public void setUpMethod() throws Exception {
// create an analytic graph
final Schema schema = SchemaFactoryUtilities.getSchemaFactory(AnalyticSchemaFactory.ANALYTIC_SCHEMA_ID).createSchema();
graph = new StoreGraph(schema);
// add attributes
vertexDegreeAttribute = SnaConcept.VertexAttribute.DEGREE_CENTRALITY.ensure(graph);
vertexInDegreeAttribute = SnaConcept.VertexAttribute.IN_DEGREE_CENTRALITY.ensure(graph);
vertexOutDegreeAttribute = SnaConcept.VertexAttribute.OUT_DEGREE_CENTRALITY.ensure(graph);
vertexSelectedAttribute = VisualConcept.VertexAttribute.SELECTED.ensure(graph);
// add vertices
vxId0 = graph.addVertex();
vxId1 = graph.addVertex();
vxId2 = graph.addVertex();
vxId3 = graph.addVertex();
vxId4 = graph.addVertex();
// add transactions
txId0 = graph.addTransaction(vxId0, vxId1, true);
txId1 = graph.addTransaction(vxId1, vxId2, true);
txId2 = graph.addTransaction(vxId1, vxId3, true);
txId3 = graph.addTransaction(vxId2, vxId3, true);
txId4 = graph.addTransaction(vxId3, vxId4, true);
}
use of au.gov.asd.tac.constellation.graph.StoreGraph in project constellation by constellation-app.
the class EigenvectorCentralityPluginNGTest method setUpMethod.
@BeforeMethod
public void setUpMethod() throws Exception {
// create an analytic graph
final Schema schema = SchemaFactoryUtilities.getSchemaFactory(AnalyticSchemaFactory.ANALYTIC_SCHEMA_ID).createSchema();
graph = new StoreGraph(schema);
// add attributes
vertexEigenvectorAttribute = SnaConcept.VertexAttribute.EIGENVECTOR_CENTRALITY.ensure(graph);
// add vertices
vxId0 = graph.addVertex();
vxId1 = graph.addVertex();
vxId2 = graph.addVertex();
vxId3 = graph.addVertex();
vxId4 = graph.addVertex();
// add transactions
txId0 = graph.addTransaction(vxId0, vxId1, true);
txId1 = graph.addTransaction(vxId1, vxId2, true);
txId2 = graph.addTransaction(vxId1, vxId3, true);
txId3 = graph.addTransaction(vxId2, vxId3, true);
txId4 = graph.addTransaction(vxId3, vxId4, true);
}
use of au.gov.asd.tac.constellation.graph.StoreGraph in project constellation by constellation-app.
the class HitsCentralityPluginNGTest method setUpMethod.
@BeforeMethod
public void setUpMethod() throws Exception {
// create an analytic graph
final Schema schema = SchemaFactoryUtilities.getSchemaFactory(AnalyticSchemaFactory.ANALYTIC_SCHEMA_ID).createSchema();
graph = new StoreGraph(schema);
// add attributes
vertexHitsAuthorityAttribute = SnaConcept.VertexAttribute.HITS_CENTRALITY_AUTHORITY.ensure(graph);
vertexHitsHubAttribute = SnaConcept.VertexAttribute.HITS_CENTRALITY_HUB.ensure(graph);
// add vertices
vxId0 = graph.addVertex();
vxId1 = graph.addVertex();
vxId2 = graph.addVertex();
vxId3 = graph.addVertex();
vxId4 = graph.addVertex();
// add transactions
txId0 = graph.addTransaction(vxId0, vxId1, true);
txId1 = graph.addTransaction(vxId1, vxId2, true);
txId2 = graph.addTransaction(vxId1, vxId3, true);
txId3 = graph.addTransaction(vxId2, vxId3, true);
txId4 = graph.addTransaction(vxId3, vxId4, true);
}
use of au.gov.asd.tac.constellation.graph.StoreGraph in project constellation by constellation-app.
the class KatzCentralityPluginNGTest method setUpMethod.
@BeforeMethod
public void setUpMethod() throws Exception {
// create an analytic graph
final Schema schema = SchemaFactoryUtilities.getSchemaFactory(AnalyticSchemaFactory.ANALYTIC_SCHEMA_ID).createSchema();
graph = new StoreGraph(schema);
// add attributes
vertexKatzAttribute = SnaConcept.VertexAttribute.KATZ_CENTRALITY.ensure(graph);
// add vertices
vxId0 = graph.addVertex();
vxId1 = graph.addVertex();
vxId2 = graph.addVertex();
vxId3 = graph.addVertex();
vxId4 = graph.addVertex();
// add transactions
txId0 = graph.addTransaction(vxId0, vxId1, true);
txId1 = graph.addTransaction(vxId1, vxId2, true);
txId2 = graph.addTransaction(vxId1, vxId3, true);
txId3 = graph.addTransaction(vxId2, vxId3, true);
txId4 = graph.addTransaction(vxId3, vxId4, true);
}
use of au.gov.asd.tac.constellation.graph.StoreGraph in project constellation by constellation-app.
the class AverageDegreeNGTest method setUpMethod.
@BeforeMethod
public void setUpMethod() throws Exception {
// create an analytic graph
final Schema schema = SchemaFactoryUtilities.getSchemaFactory(AnalyticSchemaFactory.ANALYTIC_SCHEMA_ID).createSchema();
graph = new StoreGraph(schema);
// add attributes
graphAttribute = SnaConcept.GraphAttribute.AVERAGE_DEGREE.ensure(graph);
// add vertices
// singleton
vxId0 = graph.addVertex();
// loop
vxId1 = graph.addVertex();
// 3 - 2 - 4
vxId2 = graph.addVertex();
// 3 - 2 - 4
vxId3 = graph.addVertex();
// 3 - 2 - 4
vxId4 = graph.addVertex();
// add transactions
txId1 = graph.addTransaction(vxId1, vxId1, true);
txId2 = graph.addTransaction(vxId2, vxId3, true);
txId3 = graph.addTransaction(vxId2, vxId4, true);
}
Aggregations