Skip to content

Commit

Permalink
Dataset for pretraining.
Browse files Browse the repository at this point in the history
  • Loading branch information
gsvgit committed Oct 10, 2023
1 parent 79f1940 commit 16e54f8
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 18 deletions.
3 changes: 2 additions & 1 deletion VSharp.ML.GameMaps/AStar.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using NUnit.Framework;
using VSharp.Test;

[TestSvmFixture, Category("Dataset")]
[TestSvmFixture,Category("Dataset")]
class A_star
{
// Coordinates of a cell - implements the method Equals
Expand Down Expand Up @@ -229,6 +229,7 @@ public void ResetCell(Coordinates cell, List<Coordinates> coordinatesList)
}

// The main method
[TestSvm(expectedCoverage:50, serialize:"AStar"), Category("Dataset")]
public static void AStarMain(Cell[,] field, int[,] walls)
{
Astar astar = new Astar(field, walls);
Expand Down
2 changes: 1 addition & 1 deletion VSharp.ML.GameMaps/AhoCorasick.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static int findNextState(int currentState,
// This function finds all occurrences of
// all array words in text.

[TestSvm(100,serialize:"AhoCorasick.SearchWords"), Category("Dataset")]
[TestSvm(5,serialize:"AhoCorasick.SearchWords"), Category("Dataset")]
public static List<Tuple<string, int, int>> SearchWords(String[] arr, int k,
String text)
{
Expand Down
2 changes: 1 addition & 1 deletion VSharp.ML.GameMaps/BellmanFord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Edge {
// src to all other vertices using Bellman-Ford
// algorithm. The function also detects negative weight
// cycle
[TestSvm(100,serialize:"BellmanFord"), Category("Dataset")]
[TestSvm(50,serialize:"BellmanFord"), Category("Dataset")]
public int[] BellmanFord(Graph graph, int src)
{
int V = graph.V, E = graph.E;
Expand Down
4 changes: 2 additions & 2 deletions VSharp.ML.GameMaps/BinaryMaze.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static bool isValid(int row, int col)

// function to find the shortest path between
// a given source cell to a destination cell.
[TestSvm(100,serialize:"BinaryMaze1BFS"), Category("Dataset")]
[TestSvm(70,serialize:"BinaryMaze1BFS"), Category("Dataset")]
public static int BinaryMaze1BFS(int [,]mat, Point src,
Point dest)
{
Expand Down Expand Up @@ -188,7 +188,7 @@ static int findShortestPath(int[, ] mat, int i, int j,
}

// Wrapper over findShortestPath() function
[TestSvm(100,serialize:"findShortestPathLength"), Category("Dataset")]
[TestSvm(50,serialize:"findShortestPathLength"), Category("Dataset")]
public static int findShortestPathLength(int[, ] mat,
int[] src, int[] dest)
{
Expand Down
2 changes: 1 addition & 1 deletion VSharp.ML.GameMaps/BinarySearch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static int numberOfPainters(int[] arr,
return numPainters;
}

[TestSvm(100,serialize:"bsPartition"), Category("Dataset")]
[TestSvm(20,serialize:"bsPartition"), Category("Dataset")]
static public int bsPartition(int[] arr,
int n, int k)
{
Expand Down
2 changes: 1 addition & 1 deletion VSharp.ML.GameMaps/BridgesInGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void bridgeUtil(int u, bool []visited, int []disc,

// DFS based function to find all bridges. It uses recursive
// function bridgeUtil()
[TestSvm()]
[TestSvm(expectedCoverage:50, serialize:"BridgesGraph"), Category("Dataset")]
public void bridge()
{
// Mark all the vertices as not visited
Expand Down
1 change: 1 addition & 0 deletions VSharp.ML.GameMaps/EulerCircuit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ Boolean isEulerianCycle()
}

// Driver code
[TestSvm(expectedCoverage:50, serialize:"EulerMain"), Category("Dataset")]
public static bool EulerMain(EulerGraph g)
{
return g.isEulerianCycle();
Expand Down
2 changes: 1 addition & 1 deletion VSharp.ML.GameMaps/Islands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static void DFS(int[, ] M, int i, int j, int ROW,
}
}

[TestSvm(100,serialize:"countIslands"), Category("Dataset")]
[TestSvm(50,serialize:"countIslands"), Category("Dataset")]
public static int countIslands(int[, ] M)
{
int ROW = M.GetLength(0);
Expand Down
4 changes: 2 additions & 2 deletions VSharp.ML.GameMaps/KMPSearch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ namespace VSharp.ML.GameMaps;
[TestSvmFixture, Category("Dataset")]
public class KMPSearch
{
[TestSvm(100,serialize:"SearchKMP"), Category("Dataset")]
static List<int> SearchKMP(string pat, string txt)
[TestSvm(50,serialize:"SearchKMP"), Category("Dataset")]
public static List<int> SearchKMP(string pat, string txt)
{
List<int> result = new List<int>();
int M = pat.Length;
Expand Down
4 changes: 2 additions & 2 deletions VSharp.ML.GameMaps/LCS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class LCS{

// Method returns total ways to increase
// LCS length by 1
[TestSvm(100,serialize:"waysToIncreaseLCSBy1"), Category("Dataset")]
static int waysToIncreaseLCSBy1(String str1,
[TestSvm(5,serialize:"waysToIncreaseLCSBy1"), Category("Dataset")]
public static int waysToIncreaseLCSBy1(String str1,
String str2)
{
int m = str1.Length, n = str2.Length;
Expand Down
6 changes: 3 additions & 3 deletions VSharp.ML.GameMaps/MatrixInverse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static void getCofactor(int [,]A, int [,]temp, int p, int q, int n)

/* Recursive function for finding determinant of matrix.
n is current dimension of [,]A. */
[TestSvm(100,serialize:"determinant"), Category("Dataset")]
[TestSvm(50,serialize:"determinant"), Category("Dataset")]
public static int determinant(int [,]A, int n)
{
int D = 0; // Initialize result
Expand All @@ -68,7 +68,7 @@ public static int determinant(int [,]A, int n)
}

// Function to get adjoint of A[N,N] in adj[N,N].
[TestSvm(100,serialize:"adjoint"), Category("Dataset")]
[TestSvm(50,serialize:"adjoint"), Category("Dataset")]
public static void adjoint(int [,]A, int [,]adj)
{
if (N == 1)
Expand Down Expand Up @@ -101,7 +101,7 @@ public static void adjoint(int [,]A, int [,]adj)

// Function to calculate and store inverse, returns false if
// matrix is singular
[TestSvm(100,serialize:"matrixInverse"), Category("Dataset")]
[TestSvm(5,serialize:"matrixInverse"), Category("Dataset")]
public static bool matrixInverse(int [,]A, float [,]inverse)
{
// Find determinant of [,]A
Expand Down
1 change: 1 addition & 0 deletions VSharp.ML.GameMaps/MatrixMultiplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public static void initWithZeros(int[, ] a, int r, int c){
return result_matrix;
}

[TestSvm(50,serialize:"MatrixMultiplicationMain"), Category("Dataset")]
public static int[,] MatrixMultiplicationMain (int[,] matrix_A, int[,] matrix_B) {

int[, ] result_matrix = multiply_matrix(matrix_A, matrix_B);
Expand Down
2 changes: 1 addition & 1 deletion VSharp.ML.GameMaps/MatrixQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[TestSvmFixture, Category("Dataset")]
class MatrixQuery {
[TestSvm(100,serialize:"MatrixQueryModifyMatrix"), Category("Dataset")]
[TestSvm(50,serialize:"MatrixQueryModifyMatrix"), Category("Dataset")]
public static void MatrixQueryModifyMatrix(int[, ] mat)
{

Expand Down
2 changes: 1 addition & 1 deletion VSharp.ML.GameMaps/SudokuGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ bool unUsedInCol(int j,int num)

// A recursive function to fill remaining
// matrix
[TestSvm(100,serialize:"fillRemaining"), Category("Dataset")]
[TestSvm(50,serialize:"fillRemaining"), Category("Dataset")]
public bool fillRemaining(int i, int j)
{
// System.out.println(i+" "+j);
Expand Down
2 changes: 1 addition & 1 deletion VSharp.ML.GameMaps/WordWrap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class WordWrap

// Function to find space optimized
// solution of Word Wrap problem.
[TestSvm(100,serialize:"solveWordWrap"), Category("Dataset")]
[TestSvm(20,serialize:"solveWordWrap"), Category("Dataset")]
public static List<Tuple<int, int>> solveWordWrap(int[] arr, int n, int k)
{
int i, j;
Expand Down

0 comments on commit 16e54f8

Please sign in to comment.