Source stringclasses 1
value | Date int32 2.01k 2.01k | Text stringlengths 3 15.9M | Token_count int32 1 2.44M |
|---|---|---|---|
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.services.dynamodb.model.AttributeValueUpdate;
import com.amazonaws.transform.JsonUnmarshallerContext;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers;
import com.amazonaws.transform.Unmarshaller;
import org.codehaus.jackson.JsonTo... | 331 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.transform.*;
import org.codehaus.jackson.JsonToken;
import com.amazonaws.services.dynamodb.model.*;
public class ConditionJsonUnmarshaller implements Unmarshaller<Condition, JsonUnmarshallerContext> {
public Condition unmarshall(JsonU... | 317 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.dynamodb.model.AttributeValue;
import com.amazonaws.services.dynamodb.model.BatchGetItemResult;
import com.amazonaws.services.dynamodb.model.BatchResponse;
import com.amazonaws.transform.... | 642 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.services.dynamodb.model.CreateTableRequest;
import com.amazonaws.transform.JsonUnmarshallerContext;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers;
import com.amazonaws.transform.Unmarshaller;
import org.codehaus.jackson.JsonToke... | 373 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.services.dynamodb.model.BatchGetItemRequest;
import com.amazonaws.transform.JsonUnmarshallerContext;
import com.amazonaws.transform.MapUnmarshaller;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers;
import com.amazonaws.transform.U... | 341 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.services.dynamodb.model.AttributeValueUpdate;
import com.amazonaws.services.dynamodb.model.ExpectedAttributeValue;
import com.amazonaws.services.dynamodb.model.Key;
import com.amazonaws.transform.JsonUnmarshallerContext;
import com.amazonaws... | 342 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.AmazonClientException;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.json.JSONWriter;
import java.io.StringWriter;
public class AmazonServiceExceptionMarshaller implements... | 218 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.services.dynamodb.model.*;
import com.amazonaws.transform.*;
import org.codehaus.jackson.JsonToken;
import java.util.HashMap;
import java.util.Map;
public class UpdateItemRequestJsonUnmarshaller implements Unmarshaller<UpdateItemRequest, J... | 482 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.dynamodb.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.json.JSONWriter;
import java.io.StringWriter;
public class CreateTableResultMarshaller implements ... | 693 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.dynamodb.model.AttributeValue;
import com.amazonaws.services.dynamodb.model.PutItemResult;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.json.JSONWriter;
import org... | 449 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.dynamodb.model.AttributeValue;
import com.amazonaws.services.dynamodb.model.DeleteItemResult;
import com.amazonaws.services.dynamodb.model.PutItemResult;
import com.amazonaws.transform.Ma... | 459 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.services.dynamodb.model.ListTablesRequest;
import com.amazonaws.transform.JsonUnmarshallerContext;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers;
import com.amazonaws.transform.Unmarshaller;
import org.codehaus.jackson.JsonToken... | 347 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.dynamodb.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.json.JSONWriter;
import java.io.StringWriter;
public class UpdateItemResultMarshaller implements M... | 440 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.services.dynamodb.model.BatchWriteItemRequest;
import com.amazonaws.transform.*;
import org.codehaus.jackson.JsonToken;
import com.amazonaws.services.dynamodb.model.*;
import java.util.List;
public class BatchWriteItemRequestJsonUnmarshalle... | 325 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.dynamodb.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.json.JSONWriter;
import java.io.StringWriter;
import java.util.List;
import java.util.Map;
public ... | 1,277 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.dynamodb.model.AttributeValue;
import com.amazonaws.services.dynamodb.model.Key;
import com.amazonaws.services.dynamodb.model.QueryResult;
import com.amazonaws.transform.Marshaller;
impor... | 734 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.services.dynamodb.model.*;
import com.amazonaws.services.dynamodb.model.UpdateTableRequest;
import com.amazonaws.transform.JsonUnmarshallerContext;
import com.amazonaws.transform.MapUnmarshaller;
import com.amazonaws.transform.SimpleTypeJson... | 361 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.services.dynamodb.model.DescribeTableRequest;
import com.amazonaws.transform.JsonUnmarshallerContext;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers;
import com.amazonaws.transform.Unmarshaller;
import org.codehaus.jackson.JsonTo... | 326 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.services.dynamodb.model.ProvisionedThroughput;
import com.amazonaws.transform.JsonUnmarshallerContext;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers;
import com.amazonaws.transform.Unmarshaller;
import org.codehaus.jackson.JsonT... | 363 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.dynamodb.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.json.JSONWriter;
import java.io.StringWriter;
public class UpdateTableResultMarshaller implements ... | 727 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.services.dynamodb.model.AttributeValueUpdate;
import com.amazonaws.services.dynamodb.model.ExpectedAttributeValue;
import com.amazonaws.transform.JsonUnmarshallerContext;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers;
import com... | 336 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.dynamodb.model.ScanResult;
import com.amazonaws.services.dynamodb.model.AttributeValue;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.json.JSONWriter;
import java.... | 956 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.dynamodb.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.json.JSONWriter;
import java.io.StringWriter;
public class DeleteTableResultMarshaller implements ... | 648 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.dynamodb.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.json.JSONWriter;
import java.io.StringWriter;
public class ListTablesResultMarshaller implements M... | 297 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.services.dynamodb.model.GetItemRequest;
import com.amazonaws.transform.*;
import org.codehaus.jackson.JsonToken;
public class GetItemRequestJsonUnmarshaller implements Unmarshaller<GetItemRequest, JsonUnmarshallerContext> {
public GetI... | 401 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.services.dynamodb.model.AttributeValue;
import com.amazonaws.services.dynamodb.model.ExpectedAttributeValue;
import com.amazonaws.services.dynamodb.model.ProvisionedThroughput;
import com.amazonaws.transform.JsonUnmarshallerContext;
import c... | 388 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.dynamodb.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.json.JSONWriter;
import java.io.StringWriter;
public class DescribeTableResultMarshaller implement... | 752 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.services.dynamodb.model.AttributeValue;
import com.amazonaws.services.dynamodb.model.ExpectedAttributeValue;
import com.amazonaws.services.dynamodb.model.PutItemRequest;
import com.amazonaws.transform.JsonUnmarshallerContext;
import com.amaz... | 474 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.services.dynamodb.model.DeleteTableRequest;
import com.amazonaws.transform.JsonUnmarshallerContext;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers;
import com.amazonaws.transform.Unmarshaller;
import org.codehaus.jackson.JsonToke... | 305 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.dynamodb.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.json.JSONWriter;
import java.io.StringWriter;
public class GetItemResultMarshaller implements Mars... | 383 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.services.dynamodb.model.AttributeValue;
import com.amazonaws.services.dynamodb.model.DeleteItemRequest;
import com.amazonaws.services.dynamodb.model.ExpectedAttributeValue;
import com.amazonaws.transform.JsonUnmarshallerContext;
import com.a... | 454 |
github-java-corpus | 2,012 | package com.amazonaws.services.dynamodb.model.transform;
import com.amazonaws.services.dynamodb.model.ScanRequest;
import com.amazonaws.transform.*;
import org.codehaus.jackson.JsonToken;
import com.amazonaws.services.dynamodb.model.Condition;
public class ScanRequestJsonUnmarshaller implements Unmarshaller<ScanRequ... | 445 |
github-java-corpus | 2,012 | package com.michelboudreau.test;
import com.amazonaws.services.dynamodb.datamodeling.DynamoDBMapper;
import com.amazonaws.services.dynamodb.model.*;
import com.michelboudreau.alternator.AlternatorDB;
import com.michelboudreau.alternator.AlternatorDBClient;
import org.junit.AfterClass;
import org.junit.BeforeClass;
imp... | 1,000 |
github-java-corpus | 2,012 | package com.michelboudreau.test;
import org.junit.Ignore;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({ AlternatorTableTest.class , AlternatorItemTest.class , AlternatorQueryTest.class, AlternatorScanTest.class})
public class AlternatorTestSuite {
}
| 70 |
github-java-corpus | 2,012 | package com.michelboudreau.test;
import com.amazonaws.services.dynamodb.model.*;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4... | 1,640 |
github-java-corpus | 2,012 | package com.michelboudreau.test;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.PropertiesCredentials;
import com.amazonaws.services.dynamodb.AmazonDynamoDBClient;
import com.amazonaws.services.dynamodb.model.*;
import junit.framework.Assert;
import org.junit.After;
import org.junit.Before;
import... | 1,882 |
github-java-corpus | 2,012 | package com.michelboudreau.test;
import com.amazonaws.services.dynamodb.model.*;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4... | 3,012 |
github-java-corpus | 2,012 | package com.michelboudreau.test;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.services.dynamodb.model.*;
import com.amazonaws.transform.JsonUnmarshallerContext;
import com.amazonaws.transform.Unmarshaller;
import com.michelboudreau.alternator.enums.AttributeValueType;
import org.codehaus.jackson.... | 3,454 |
github-java-corpus | 2,012 | package com.michelboudreau.test;
import com.amazonaws.services.dynamodb.model.*;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4... | 1,894 |
github-java-corpus | 2,012 | package edu.aa12;
import java.util.Arrays;
import java.util.Set;
import java.util.HashSet;
import java.util.Comparator;
import lpsolve.LpSolve;
import edu.aa12.DisjointSet.DSNode;
public class RadiusBNB extends BranchAndBound_TSP {
LpSolve solver;
DisjointSet ds = new DisjointSet();
public RadiusBNB(Gra... | 1,006 |
github-java-corpus | 2,012 | package edu.aa12;
/**
* Implementation of the ILP relaxation lower bound
*/
public class Radius {
public static void main(String[] args) throws Exception {
solveGraph(new Instance1());
solveGraph(new Instance2());
solveGraph(new Instance3());
}
public static void solveGraph(Graph... | 132 |
github-java-corpus | 2,012 | package edu.aa12;
/**
* Graph with 30 vertices distributed roughly on a circle and 66 edges corresponding
* to an alpha-complex with alpha = 2.
*/
public class Instance2 extends Graph{
private static double[][] coords = new double[][]{
new double[]{-3.44,0.87},
new double[]{-3.16,0.72},
new double[]{-3.04,... | 992 |
github-java-corpus | 2,012 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.aa12;
import lpsolve.LpSolve;
import lpsolve.LpSolveException;
/**
*
* @author Laursen
*/
public class lptest {
public static void main(String[] args)
{
try {
// Create a problem wi... | 299 |
github-java-corpus | 2,012 | package edu.aa12;
/** An edge in a graph, represented by the indices of the vertices. */
public class Edge {
public int u,v;
public Edge(int u, int v){
this.u = u;
this.v = v;
}
public boolean equals(Object o){
if(o instanceof Edge){
Edge e = (Edge)o;
return (u==e.u&&v==e.v)||(u==e.v&&v==e.u);
}
... | 130 |
github-java-corpus | 2,012 | package edu.aa12;
public class DisjointSet {
public DisjointSet() {}
public DSNode makeSet(Object object) { return new DSNode(object); }
public DSNode find(DSNode node) {
DSNode nd = node;
while (nd != nd.parent) nd = nd.parent;
compress(node, nd);
return nd;
}
pu... | 307 |
github-java-corpus | 2,012 | package edu.aa12;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import edu.aa12.DisjointSet.DSNode;
/** Class for finding the minimum spanning tree using Kruskals algorithm */
public class Kruskal {
private final DSNode[] n... | 595 |
github-java-corpus | 2,012 | package edu.aa12;
/**
* A graph with 9 randomly distributed vertices, that are fully connected by 72 edges
*/
public class Instance1 extends Graph{
private static double[][] coords = new double[][]{
new double[]{2.51,-0.71},
new double[]{1.90,-0.66},
new double[]{2.11,-0.91},
new double[]{2.35,-1.13},
... | 230 |
github-java-corpus | 2,012 | package edu.aa12;
import java.util.Collections;
import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.Random;
import edu.aa12.DisjointSet.DSNode;
/**
* An implementation of branch-and-bound for TSP with the lower-bound method missing.
*/
public class BranchAndBound_TSP {
/** Finds the mini... | 1,308 |
github-java-corpus | 2,012 | package edu.aa12;
/**
* Implementation of the ILP relaxation lower bound
*/
public class Relax {
public static void solveGraph(Graph g) throws Exception {
long start = System.nanoTime();
BnBNode n = new RelaxBNB(g).solve();
long end = System.nanoTime();
System.out.printf("Took %.2... | 132 |
github-java-corpus | 2,012 | package edu.aa12;
import java.util.Random;
import java.util.List;
import java.util.Collections;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Comparator;
import edu.aa12.DisjointSet.DSNode;
public class OneTreeBNB extends BranchAndBound_TSP {
public OneTreeBNB(Graph g){
super(... | 1,051 |
github-java-corpus | 2,012 | package edu.aa12;
public class Instance3 extends Graph{
private static double[][] coords = new double[][]{
new double[]{-3.44,0.87},
new double[]{-3.38,-0.15},
new double[]{-3.34,-0.68},
new double[]{-3.25,1.34},
new double[]{-3.16,0.72},
new double[]{-3.09,2.10},
new double[]{-3.04,-0.07},
new double... | 4,011 |
github-java-corpus | 2,012 | package edu.aa12;
/**
* A node in the branch-and-bound tree.
*/
public class BnBNode{
public double lowerBound;
public final BnBNode parent;
/** The depth in the bnb-tree*/
public final int depth;
/** The number of edges defined on the path to the root */
public final int edgesDefined;
public final Edge e... | 275 |
github-java-corpus | 2,012 | package edu.aa12;
public class MainMethods {
public static void main(String[] args) throws Exception {
solveGraph(new Instance1());
solveGraph(new Instance2());
solveGraph(new Instance3());
}
public static void solveGraph(Graph g) throws Exception {
BranchAndBound_TSP solver = new BranchAndBound_TSP(g);
... | 155 |
github-java-corpus | 2,012 | package edu.aa12;
import lpsolve.LpSolve;
import lpsolve.LpSolveException;
public class RelaxBNB extends BranchAndBound_TSP {
LpSolve solver;
public RelaxBNB(Graph g) throws Exception {
super(g);
int n = g.getVertices();
solver = LpSolve.makeLp(0, n*n+n + 1);
solver.setPresol... | 769 |
github-java-corpus | 2,012 | package edu.aa12;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
/** A representation of an undirected graph. Vertices are implicitly represented as numbers from 0 to (getVertices()-1). */
public abstract class Graph {
public final double[][] vertexCoords;
public final List<Edge> e... | 413 |
github-java-corpus | 2,012 | package edu.aa12;
/**
* Implementation of the 1-tree lower-bound algorithm.
*/
public class OneTree {
public static void main(String[] args) throws Exception {
solveGraph(new Instance1());
solveGraph(new Instance2());
solveGraph(new Instance3());
}
public static void solveGraph(Graph g) throws ... | 135 |
github-java-corpus | 2,012 | package edu.aa12;
import java.awt.Color;
import java.util.List;
import ProGAL.geom2d.Circle;
import ProGAL.geom2d.LineSegment;
import ProGAL.geom2d.Point;
import ProGAL.geom2d.viewer.J2DScene;
import ProGAL.geom2d.viewer.TextShape;
/**
* Class for visualizing solutions. Requires ProGAL (www.diku.dk/~rfonseca/ProGA... | 706 |
github-java-corpus | 2,012 | package edu.aa12;
import java.util.Arrays;
import java.util.Set;
import java.util.HashSet;
import java.util.Comparator;
import lpsolve.LpSolve;
import edu.aa12.DisjointSet.DSNode;
public class RadiusBNB extends BranchAndBound_TSP {
LpSolve solver;
DisjointSet ds = new DisjointSet();
public RadiusBNB(Gra... | 1,006 |
github-java-corpus | 2,012 | package edu.aa12;
/**
* Implementation of the ILP relaxation lower bound
*/
public class Radius {
public static void main(String[] args) throws Exception {
solveGraph(new Instance1());
solveGraph(new Instance2());
solveGraph(new Instance3());
}
public static void solveGraph(Graph... | 132 |
github-java-corpus | 2,012 | package edu.aa12;
/**
* Graph with 30 vertices distributed roughly on a circle and 66 edges corresponding
* to an alpha-complex with alpha = 2.
*/
public class Instance2 extends Graph{
private static double[][] coords = new double[][]{
new double[]{-3.44,0.87},
new double[]{-3.16,0.72},
new double[]{-3.04,... | 992 |
github-java-corpus | 2,012 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.aa12;
import lpsolve.LpSolve;
import lpsolve.LpSolveException;
/**
*
* @author Laursen
*/
public class lptest {
public static void main(String[] args)
{
try {
// Create a problem wi... | 299 |
github-java-corpus | 2,012 | package edu.aa12;
/** An edge in a graph, represented by the indices of the vertices. */
public class Edge {
public int u,v;
public Edge(int u, int v){
this.u = u;
this.v = v;
}
public boolean equals(Object o){
if(o instanceof Edge){
Edge e = (Edge)o;
return (u==e.u&&v==e.v)||(u==e.v&&v==e.u);
}
... | 130 |
github-java-corpus | 2,012 | package edu.aa12;
public class DisjointSet {
public DisjointSet() {}
public DSNode makeSet(Object object) { return new DSNode(object); }
public DSNode find(DSNode node) {
DSNode nd = node;
while (nd != nd.parent) nd = nd.parent;
compress(node, nd);
return nd;
}
pu... | 307 |
github-java-corpus | 2,012 | package edu.aa12;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import edu.aa12.DisjointSet.DSNode;
/** Class for finding the minimum spanning tree using Kruskals algorithm */
public class Kruskal {
private final DSNode[] n... | 595 |
github-java-corpus | 2,012 | package edu.aa12;
/**
* A graph with 9 randomly distributed vertices, that are fully connected by 72 edges
*/
public class Instance1 extends Graph{
private static double[][] coords = new double[][]{
new double[]{2.51,-0.71},
new double[]{1.90,-0.66},
new double[]{2.11,-0.91},
new double[]{2.35,-1.13},
... | 230 |
github-java-corpus | 2,012 | package edu.aa12;
import java.util.Collections;
import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.Random;
import edu.aa12.DisjointSet.DSNode;
/**
* An implementation of branch-and-bound for TSP with the lower-bound method missing.
*/
public class BranchAndBound_TSP {
/** Finds the mini... | 1,308 |
github-java-corpus | 2,012 | package edu.aa12;
/**
* Implementation of the ILP relaxation lower bound
*/
public class Relax {
public static void solveGraph(Graph g) throws Exception {
long start = System.nanoTime();
BnBNode n = new RelaxBNB(g).solve();
long end = System.nanoTime();
System.out.printf("Took %.2... | 132 |
github-java-corpus | 2,012 | package edu.aa12;
import java.util.Random;
import java.util.List;
import java.util.Collections;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Comparator;
import edu.aa12.DisjointSet.DSNode;
public class OneTreeBNB extends BranchAndBound_TSP {
public OneTreeBNB(Graph g){
super(... | 1,051 |
github-java-corpus | 2,012 | package edu.aa12;
public class Instance3 extends Graph{
private static double[][] coords = new double[][]{
new double[]{-3.44,0.87},
new double[]{-3.38,-0.15},
new double[]{-3.34,-0.68},
new double[]{-3.25,1.34},
new double[]{-3.16,0.72},
new double[]{-3.09,2.10},
new double[]{-3.04,-0.07},
new double... | 4,011 |
github-java-corpus | 2,012 | package edu.aa12;
/**
* A node in the branch-and-bound tree.
*/
public class BnBNode{
public double lowerBound;
public final BnBNode parent;
/** The depth in the bnb-tree*/
public final int depth;
/** The number of edges defined on the path to the root */
public final int edgesDefined;
public final Edge e... | 275 |
github-java-corpus | 2,012 | package edu.aa12;
public class MainMethods {
public static void main(String[] args) throws Exception {
solveGraph(new Instance1());
solveGraph(new Instance2());
solveGraph(new Instance3());
}
public static void solveGraph(Graph g) throws Exception {
BranchAndBound_TSP solver = new BranchAndBound_TSP(g);
... | 155 |
github-java-corpus | 2,012 | package edu.aa12;
import lpsolve.LpSolve;
import lpsolve.LpSolveException;
public class RelaxBNB extends BranchAndBound_TSP {
LpSolve solver;
public RelaxBNB(Graph g) throws Exception {
super(g);
int n = g.getVertices();
solver = LpSolve.makeLp(0, n*n+n + 1);
solver.setPresol... | 769 |
github-java-corpus | 2,012 | package edu.aa12;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
/** A representation of an undirected graph. Vertices are implicitly represented as numbers from 0 to (getVertices()-1). */
public abstract class Graph {
public final double[][] vertexCoords;
public final List<Edge> e... | 413 |
github-java-corpus | 2,012 | package edu.aa12;
/**
* Implementation of the 1-tree lower-bound algorithm.
*/
public class OneTree {
public static void main(String[] args) throws Exception {
solveGraph(new Instance1());
solveGraph(new Instance2());
solveGraph(new Instance3());
}
public static void solveGraph(Graph g) throws ... | 135 |
github-java-corpus | 2,012 | package edu.aa12;
import java.awt.Color;
import java.util.List;
import ProGAL.geom2d.Circle;
import ProGAL.geom2d.LineSegment;
import ProGAL.geom2d.Point;
import ProGAL.geom2d.viewer.J2DScene;
import ProGAL.geom2d.viewer.TextShape;
/**
* Class for visualizing solutions. Requires ProGAL (www.diku.dk/~rfonseca/ProGA... | 706 |
github-java-corpus | 2,012 | public class AdvancedAlgorithms {
public static void main(String[] args) {
int[][] cs = new int[27][27];
connect(0 , 7 , 10 , cs);
connect(0 , 6 , 20 , cs);
connect(1 , 7 , 10 , cs);
connect(1 , 8 , 10 , cs);
connect(2 , 3 , 15 , cs);
connect(2 , 8 , 40 , cs);
connect(2 , 9 , 25 , cs)... | 881 |
github-java-corpus | 2,012 | package com.bronzebyte.bukkit;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import org.bukkit.OfflinePlayer;
import org.bukkit.plugin.java.JavaPlugin;
import org.jhttp.error.JHttpError;
import org.jhttp.module.JHttpModule;
import org.jhtt... | 599 |
github-java-corpus | 2,012 | package com.heroku.devcenter;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.MessageProperties;
import org.quartz.*;
import org.quartz.impl.StdSchedulerFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;... | 416 |
github-java-corpus | 2,012 | package com.heroku.devcenter;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.QueueingConsumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Collections;
import java.util.HashMap;
import j... | 287 |
github-java-corpus | 2,012 | package org.acme.actors.test;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
public class Activator implements BundleActivator {
private static BundleContext context;
static BundleContext getContext() {
return context;
}
/*
* (non-Javadoc)
* @see org.osgi.framework.Bu... | 150 |
github-java-corpus | 2,012 | package org.acme.actors.test;
import java.util.List;
import org.dawb.passerelle.common.actors.AbstractDataMessageTransformer;
import org.dawb.passerelle.common.message.DataMessageComponent;
import org.dawb.passerelle.common.message.MessageUtils;
import ptolemy.kernel.CompositeEntity;
import ptolemy.kernel.util.Illeg... | 238 |
github-java-corpus | 2,012 | package org.acme.actors.fridge;
import java.util.List;
import org.dawb.passerelle.common.actors.AbstractDataMessageTransformer;
import org.dawb.passerelle.common.message.DataMessageComponent;
import org.dawb.passerelle.common.message.IVariable;
import org.dawb.passerelle.common.message.IVariable.VARIABLE_TYPE;
import... | 489 |
github-java-corpus | 2,012 | package org.acme.actors.fridge;
import java.util.List;
import org.dawb.passerelle.common.actors.AbstractDataMessageTransformer;
import org.dawb.passerelle.common.message.DataMessageComponent;
import org.dawb.passerelle.common.message.IVariable;
import org.dawb.passerelle.common.message.MessageUtils;
import org.dawb.p... | 445 |
github-java-corpus | 2,012 | package org.acme.actors.fridge;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
public class Activator implements BundleActivator {
private static BundleContext context;
static BundleContext getContext() {
return context;
}
/*
* (non-Javadoc)
* @see org.osgi.framework.... | 151 |
github-java-corpus | 2,012 | package org.acme.actors.fridge;
import java.util.List;
import org.dawb.passerelle.common.actors.AbstractDataMessageTransformer;
import org.dawb.passerelle.common.message.DataMessageComponent;
import org.dawb.passerelle.common.message.MessageUtils;
import ptolemy.kernel.CompositeEntity;
import ptolemy.kernel.util.Ill... | 349 |
github-java-corpus | 2,012 | package org.acme.actors.fridge;
import java.util.List;
import org.dawb.passerelle.common.actors.AbstractDataMessageSink;
import org.dawb.passerelle.common.message.DataMessageComponent;
import org.dawb.passerelle.common.message.MessageUtils;
import ptolemy.kernel.CompositeEntity;
import ptolemy.kernel.util.IllegalAct... | 338 |
github-java-corpus | 2,012 | /*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at y... | 549 |
github-java-corpus | 2,012 | /*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at y... | 1,266 |
github-java-corpus | 2,012 | /*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at y... | 576 |
github-java-corpus | 2,012 | /*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at y... | 367 |
github-java-corpus | 2,012 | /*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at y... | 774 |
github-java-corpus | 2,012 | /*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at y... | 1,723 |
github-java-corpus | 2,012 | /*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at y... | 376 |
github-java-corpus | 2,012 | /*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at y... | 400 |
github-java-corpus | 2,012 | package org.alfresco.encryption;
import java.security.SecureRandom;
import javax.crypto.spec.DESedeKeySpec;
import org.apache.commons.codec.binary.Base64;
/**
*
* Generate a secret key for use by the repository.
*
* @since 4.0
*
*/
public class GenerateSecretKey
{
public byte[] generateKeyData()
{
try
... | 231 |
github-java-corpus | 2,012 | /*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at y... | 298 |
github-java-corpus | 2,012 | /*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at y... | 942 |
github-java-corpus | 2,012 | /*
* Copyright 2005-2010 Alfresco Software, Ltd. All rights reserved.
*
* License rights for this program may be obtained from Alfresco Software, Ltd.
* pursuant to a written agreement and any use of this program without such an
* agreement is prohibited.
*/
package org.alfresco.encryption;
import java.... | 1,798 |
github-java-corpus | 2,012 | /*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at y... | 263 |
github-java-corpus | 2,012 | /*
* Copyright (C) 2005-2011 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at y... | 1,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.