public class AvgStats
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
boundObjLiteralCount |
static long |
BoundObjLiteralCount |
static long |
boundObjURICount |
static long |
boundPredCount |
static long |
boundSbjCount |
static long |
endpointSize1 |
static java.util.Map<java.lang.Integer,java.lang.String> |
featureDimensions |
static long |
grandTotalTriplePatterns |
Constructor and Description |
---|
AvgStats() |
Modifier and Type | Method and Description |
---|---|
static java.util.Map<java.lang.String,java.lang.Double> |
getAvgLogFeatures(java.util.Set<java.lang.String> queries,
java.lang.String endpoint,
java.lang.String graph) |
static java.util.Map<java.lang.String,java.lang.Double> |
getAvgLogFeatures(java.lang.String queryFileWithStats) |
static java.util.Set<java.lang.String> |
getbsbmueries(java.lang.String bsbmRunFile) |
static java.util.Set<java.lang.String> |
getDBPSBQueries(java.lang.String dbpediaBenchmarkQueriesFile) |
static java.util.List<java.lang.Double[]> |
getDimensionWiseVectors(java.util.Map<java.lang.String,java.lang.Double[]> normalizedVectors)
Get the dimension-wise vectors of the the normalized vectors
|
static java.lang.Double[] |
getFeaturesStateVector(java.lang.String query,
java.lang.String endpoint,
java.lang.String graph,
java.lang.String type)
Print query statistics and return them as an array as well
|
static java.util.Map<java.lang.String,java.lang.Double[]> |
getFeaturesStatsVectors(java.util.Set<java.lang.String> queries,
java.lang.String endpoint,
java.lang.String graph) |
static java.util.HashSet<HyperGraph.Vertex> |
getJoinVertexCount(java.util.HashSet<HyperGraph.Vertex> Vertices)
Get the the list of join vertices
|
static java.util.Set<java.lang.String> |
getLineByLineQueries(java.lang.String inputDir) |
static java.lang.Double[] |
getMaxVector(java.util.List<java.lang.Double[]> dimLogVectors) |
static java.lang.Double[] |
getMeanVector(java.util.List<java.lang.Double[]> vectors)
Get vector of Means
|
static java.lang.Double[] |
getMinVector(java.util.List<java.lang.Double[]> dimLogVectors) |
static java.lang.String |
getObjectVertexLabel(org.openrdf.query.algebra.StatementPattern stmt)
Get label for the object vertex of a triple pattern
|
static java.util.Map<java.lang.String,java.lang.Double> |
getPercentUsedConstructs(java.util.Set<java.lang.String> queries) |
static java.util.Map<java.lang.String,java.lang.Double> |
getPercentUsedLogConstructs(java.lang.String queryFileWithStats) |
static java.lang.String |
getPredicateVertexLabel(org.openrdf.query.algebra.StatementPattern stmt)
Get label for the predicate vertex of a triple pattern
|
static java.util.Set<java.lang.String> |
getQueriesFromDirectory(java.lang.String inputDir) |
static java.lang.Double[] |
getStandardDeviationVector(java.util.List<java.lang.Double[]> vectors)
Get vector of S.Ds
|
static java.lang.String |
getSubjectVertexLabel(org.openrdf.query.algebra.StatementPattern stmt)
Get label for the subject vertex of a triple pattern
|
static HyperGraph.Vertex |
getVertex(java.lang.String label,
java.util.HashSet<HyperGraph.Vertex> V)
Retrieve a vertex having a specific label from a set of Vertrices
|
static void |
main(java.lang.String[] args) |
static void |
printPercentClauses(java.util.Map<java.lang.String,java.lang.Double> percentClauses) |
static boolean |
vertexExist(HyperGraph.Vertex sbjVertex,
java.util.HashSet<HyperGraph.Vertex> V)
Check if a vertex already exists in set of all vertices
|
public static final int boundObjLiteralCount
public static long boundSbjCount
public static long boundPredCount
public static long boundObjURICount
public static long BoundObjLiteralCount
public static long grandTotalTriplePatterns
public static java.util.Map<java.lang.Integer,java.lang.String> featureDimensions
public static long endpointSize1
public static void main(java.lang.String[] args) throws org.openrdf.repository.RepositoryException, org.openrdf.query.MalformedQueryException, org.openrdf.query.QueryEvaluationException, java.io.IOException
org.openrdf.repository.RepositoryException
org.openrdf.query.MalformedQueryException
org.openrdf.query.QueryEvaluationException
java.io.IOException
public static java.util.Set<java.lang.String> getbsbmueries(java.lang.String bsbmRunFile) throws java.io.IOException
java.io.IOException
public static java.util.Set<java.lang.String> getLineByLineQueries(java.lang.String inputDir) throws java.io.IOException
java.io.IOException
public static java.util.Map<java.lang.String,java.lang.Double> getAvgLogFeatures(java.util.Set<java.lang.String> queries, java.lang.String endpoint, java.lang.String graph) throws org.openrdf.query.MalformedQueryException, org.openrdf.repository.RepositoryException, org.openrdf.query.QueryEvaluationException, java.io.IOException
org.openrdf.query.MalformedQueryException
org.openrdf.repository.RepositoryException
org.openrdf.query.QueryEvaluationException
java.io.IOException
public static java.util.Map<java.lang.String,java.lang.Double> getPercentUsedLogConstructs(java.lang.String queryFileWithStats) throws java.io.IOException
java.io.IOException
public static java.util.Map<java.lang.String,java.lang.Double> getAvgLogFeatures(java.lang.String queryFileWithStats) throws java.io.IOException
java.io.IOException
public static java.lang.Double[] getMinVector(java.util.List<java.lang.Double[]> dimLogVectors)
public static java.lang.Double[] getMaxVector(java.util.List<java.lang.Double[]> dimLogVectors)
public static java.lang.Double[] getStandardDeviationVector(java.util.List<java.lang.Double[]> vectors)
vectors
- List of Vectorspublic static java.lang.Double[] getMeanVector(java.util.List<java.lang.Double[]> vectors)
vectors
- List of Vectorspublic static java.util.List<java.lang.Double[]> getDimensionWiseVectors(java.util.Map<java.lang.String,java.lang.Double[]> normalizedVectors)
normalizedVectors
- Map of query ids to corresponding normalized vectorspublic static java.util.Set<java.lang.String> getDBPSBQueries(java.lang.String dbpediaBenchmarkQueriesFile) throws java.io.IOException
java.io.IOException
public static void printPercentClauses(java.util.Map<java.lang.String,java.lang.Double> percentClauses)
public static java.util.Map<java.lang.String,java.lang.Double> getPercentUsedConstructs(java.util.Set<java.lang.String> queries)
public static java.util.Set<java.lang.String> getQueriesFromDirectory(java.lang.String inputDir) throws java.io.IOException
java.io.IOException
public static java.util.Map<java.lang.String,java.lang.Double[]> getFeaturesStatsVectors(java.util.Set<java.lang.String> queries, java.lang.String endpoint, java.lang.String graph) throws org.openrdf.query.MalformedQueryException, org.openrdf.repository.RepositoryException, org.openrdf.query.QueryEvaluationException, java.io.IOException
org.openrdf.query.MalformedQueryException
org.openrdf.repository.RepositoryException
org.openrdf.query.QueryEvaluationException
java.io.IOException
public static java.lang.Double[] getFeaturesStateVector(java.lang.String query, java.lang.String endpoint, java.lang.String graph, java.lang.String type) throws org.openrdf.query.MalformedQueryException, org.openrdf.repository.RepositoryException, org.openrdf.query.QueryEvaluationException, java.io.IOException
query
- SPARQL querygraph
- Named graphendpoint
- endpointtype
- org.openrdf.query.MalformedQueryException
org.openrdf.query.QueryEvaluationException
org.openrdf.repository.RepositoryException
java.io.IOException
public static java.util.HashSet<HyperGraph.Vertex> getJoinVertexCount(java.util.HashSet<HyperGraph.Vertex> Vertices)
Vertices
- List of vertices in BGPpublic static java.lang.String getObjectVertexLabel(org.openrdf.query.algebra.StatementPattern stmt)
stmt
- triple patternpublic static java.lang.String getPredicateVertexLabel(org.openrdf.query.algebra.StatementPattern stmt)
stmt
- triple patternpublic static java.lang.String getSubjectVertexLabel(org.openrdf.query.algebra.StatementPattern stmt)
stmt
- triple patternpublic static boolean vertexExist(HyperGraph.Vertex sbjVertex, java.util.HashSet<HyperGraph.Vertex> V)
sbjVertex
- V
- Set of all verticespublic static HyperGraph.Vertex getVertex(java.lang.String label, java.util.HashSet<HyperGraph.Vertex> V)
label
- Label of vertex to be retrievedV
- Set of vertices