$darkmode
DENOPTIM
denoptim.graph.VertexQuery Class Reference

Query for searching vertices. More...

Collaboration diagram for denoptim.graph.VertexQuery:
[legend]

Public Member Functions

 VertexQuery ()
 Constructor from empty queries. More...
 
 VertexQuery (Long vID, VertexType vType, BBType bbType, Integer bbID, Integer level, List< AttachmentPointQuery > apQueries, EdgeQuery eIn, EdgeQuery eOut)
 Constructor from vertex and edge queries. More...
 
boolean matches (Vertex v)
 Tests whether the given vertex satisfies all non-null criteria in this query. More...
 

Static Private Member Functions

static boolean matchesAnyEdge (Vertex v, EdgeQuery edgeQuery, boolean incoming)
 

Private Attributes

Long vertexId = null
 Query on unique identifier or null. More...
 
Integer buildingBlockId = null
 Query on building block in the library of building blocks, or null. More...
 
BBType buildingBlockType = null
 Query on building block type or null. More...
 
VertexType vertexType = null
 Query on type of vertex. More...
 
Integer level = null
 Query about the level of the vertex. More...
 
List< AttachmentPointQueryapQueries = null
 List of attachment point queries on the vertex. More...
 
EdgeQuery incomingEdgeQuery
 Query on the vertex' incoming connections (i.e., vertex id the target) More...
 
EdgeQuery outgoingEdgeQuery
 Query on the vertex' out coming connections (i.e., vertex id the source) More...
 

Detailed Description

Query for searching vertices.

Definition at line 30 of file VertexQuery.java.

Constructor & Destructor Documentation

◆ VertexQuery() [1/2]

denoptim.graph.VertexQuery.VertexQuery ( )

Constructor from empty queries.

Definition at line 77 of file VertexQuery.java.

◆ VertexQuery() [2/2]

denoptim.graph.VertexQuery.VertexQuery ( Long  vID,
VertexType  vType,
BBType  bbType,
Integer  bbID,
Integer  level,
List< AttachmentPointQuery apQueries,
EdgeQuery  eIn,
EdgeQuery  eOut 
)

Constructor from vertex and edge queries.

Parameters
vIDthe query on vertex's unique identifier, or null.
vTypethe query on vertex's type (i.e., EmptyVertex, Fragment, or Template), or null.
bbTypethe query on vertex's building block type, or null,
bbIDthe query on vertex's building block ID in the library of hit type, or null.
levelthe level of the vertices to match, or null. Remember level is an integer that starts from -1.
apQueriesthe list of attachment point queries on the vertex, or null.
eInthe edge query (filters candidates based on the connection of a candidate with the rest of the graph) for incoming connections where the candidate vertex if the target.
eOutthe edge query (filters candidates based on the connection of a candidate with the rest of the graph) for outgoing connections where the candidate vertex if the source.

Definition at line 102 of file VertexQuery.java.

References denoptim.graph.VertexQuery.apQueries, and denoptim.graph.VertexQuery.level.

Member Function Documentation

◆ matches()

boolean denoptim.graph.VertexQuery.matches ( Vertex  v)

Tests whether the given vertex satisfies all non-null criteria in this query.

Parameters
vthe vertex to test
Returns
true if the vertex matches, false otherwise

Definition at line 125 of file VertexQuery.java.

References denoptim.graph.VertexQuery.apQueries, denoptim.graph.VertexQuery.buildingBlockId, denoptim.graph.VertexQuery.buildingBlockType, denoptim.graph.Vertex.getAttachmentPoints(), denoptim.graph.Vertex.getBuildingBlockId(), denoptim.graph.Vertex.getBuildingBlockType(), denoptim.graph.Vertex.getGraphOwner(), denoptim.graph.DGraph.getLevel(), denoptim.graph.Vertex.getVertexId(), denoptim.graph.Vertex.getVertexType(), denoptim.graph.VertexQuery.incomingEdgeQuery, denoptim.graph.VertexQuery.level, denoptim.graph.VertexQuery.matches(), denoptim.graph.VertexQuery.matchesAnyEdge(), denoptim.graph.VertexQuery.outgoingEdgeQuery, denoptim.graph.VertexQuery.vertexId, and denoptim.graph.VertexQuery.vertexType.

Referenced by denoptim.graph.DGraph.findVertices(), denoptim.graph.AttachmentPointQuery.matches(), denoptim.graph.EdgeQuery.matches(), denoptim.graph.VertexQuery.matches(), denoptim.graph.VertexQueryTest.testEmptyEdgeQueryFiltersVertices(), denoptim.graph.VertexQueryTest.testFindVerticesUsesMatches(), denoptim.graph.VertexQueryTest.testMatchesAllNullCriteria(), denoptim.graph.VertexQueryTest.testMatchesAttachmentPointQueries(), denoptim.graph.VertexQueryTest.testMatchesBuildingBlockTypeAndId(), denoptim.graph.VertexQueryTest.testMatchesIncomingAndOutgoingEdgeQueries(), denoptim.graph.VertexQueryTest.testMatchesIncomingEdgeQuery(), denoptim.graph.VertexQueryTest.testMatchesLevel(), denoptim.graph.VertexQueryTest.testMatchesOutgoingEdgeQuery(), denoptim.graph.VertexQueryTest.testMatchesVertexId(), and denoptim.graph.VertexQueryTest.testMatchesVertexType().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ matchesAnyEdge()

static boolean denoptim.graph.VertexQuery.matchesAnyEdge ( Vertex  v,
EdgeQuery  edgeQuery,
boolean  incoming 
)
staticprivate

Definition at line 196 of file VertexQuery.java.

References denoptim.graph.DGraph.getEdgesWithSrc(), denoptim.graph.DGraph.getEdgesWithTrg(), denoptim.graph.Vertex.getGraphOwner(), and denoptim.graph.EdgeQuery.matches().

Referenced by denoptim.graph.VertexQuery.matches().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ apQueries

List<AttachmentPointQuery> denoptim.graph.VertexQuery.apQueries = null
private

List of attachment point queries on the vertex.

Definition at line 60 of file VertexQuery.java.

Referenced by denoptim.graph.VertexQuery.matches(), and denoptim.graph.VertexQuery.VertexQuery().

◆ buildingBlockId

Integer denoptim.graph.VertexQuery.buildingBlockId = null
private

Query on building block in the library of building blocks, or null.

Definition at line 40 of file VertexQuery.java.

Referenced by denoptim.graph.VertexQuery.matches().

◆ buildingBlockType

BBType denoptim.graph.VertexQuery.buildingBlockType = null
private

Query on building block type or null.

Definition at line 45 of file VertexQuery.java.

Referenced by denoptim.graph.VertexQuery.matches().

◆ incomingEdgeQuery

EdgeQuery denoptim.graph.VertexQuery.incomingEdgeQuery
private

Query on the vertex' incoming connections (i.e., vertex id the target)

Definition at line 65 of file VertexQuery.java.

Referenced by denoptim.graph.VertexQuery.matches().

◆ level

Integer denoptim.graph.VertexQuery.level = null
private

Query about the level of the vertex.

Definition at line 55 of file VertexQuery.java.

Referenced by denoptim.graph.VertexQuery.matches(), and denoptim.graph.VertexQuery.VertexQuery().

◆ outgoingEdgeQuery

EdgeQuery denoptim.graph.VertexQuery.outgoingEdgeQuery
private

Query on the vertex' out coming connections (i.e., vertex id the source)

Definition at line 70 of file VertexQuery.java.

Referenced by denoptim.graph.VertexQuery.matches().

◆ vertexId

Long denoptim.graph.VertexQuery.vertexId = null
private

Query on unique identifier or null.

Definition at line 35 of file VertexQuery.java.

Referenced by denoptim.graph.VertexQuery.matches().

◆ vertexType

VertexType denoptim.graph.VertexQuery.vertexType = null
private

Query on type of vertex.

Definition at line 50 of file VertexQuery.java.

Referenced by denoptim.graph.VertexQuery.matches().


The documentation for this class was generated from the following file: