repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
connormas/Algorithms | Competitive Coding/Graphs/Graph_Search/DepthFIrstSearch/Depth_First_Search.cpp | #include<bits/stdc++.h>
using namespace std;
void addEdge(vector<int>adj[],int u,int v)
{
//For undirected graph
adj[u].push_back(v);
adj[v].push_back(u);
}
void DFSUtil(int u,vector<int>adj[],vector<bool>&visited)
{
visited[u]=true;
cout<<u<<" ";
for(int i=0;i<adj[u].size();i++)
{
if(visited[adj[u][i]]==fal... |
connormas/Algorithms | Competitive Coding/Graphs/Topological Sort/topological.cpp | <filename>Competitive Coding/Graphs/Topological Sort/topological.cpp<gh_stars>0
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<fstream>
#include<string>
#include<vector>
#define MAX 1024
using namespace std;
void create_graph(const string filename);
void add(int vertex);
int del();
int isEmpty();
i... |
BanaanKiamanesh/Evo-Copter | ESC-Caliberation-Motor-Check/main.cpp | #include <iostream>
#include <wiringPi.h>
#include <wiringPiI2C.h>
#include "PCA9685.h"
// declare MAX and MIN Available PWM Length for the ESCs
#define MIN_PWM 2048
#define MAX_PWM 4095
// Motor Pins properties
const int pins[] = {13, 14, 15, 16};
int main()
{
PCA9685 pca;
// Check if Motor Driver is Conne... |
BanaanKiamanesh/Evo-Copter | PIDGainEvaluator/PIDGainEval.cpp | #include <iostream>
#include <fstream>
#include <wiringPi.h>
#include <wiringPiI2C.h>
#include <cmath>
#include "PCA9685.h"
#include "BNO055.h"
#include "PID.h"
int main(int argc, char **argv) // Main Func Input Seq: Throttle, K_p, K_i, K_d, Tau, Max Allowed Motor Speed
{
/*
Initial Harware Setups
*/
... |
BanaanKiamanesh/Evo-Copter | IMU-test/main.cpp | #include <iostream>
#include "BNO055.h"
#include <wiringPi.h>
#include <wiringPiI2C.h>
int main()
{
BNO055 imu;
imu.init();
imu.update();
while (true)
{
imu.print_state();
}
return 0;
} |
BanaanKiamanesh/Evo-Copter | Motor-Kill/killMotors.cpp | #include <iostream>
#include <wiringPi.h>
#include <wiringPiI2C.h>
#include "PCA9685.h"
#define MIN_PWM 2048
#define MAX_PWM 4095
int main()
{
PCA9685 pca;
pca.setPWMFreq(500);
for (int i = 1; i <= 16; i++)
{
pca.setPWM(i, MIN_PWM);
delay(25);
}
delay(250);
std::cout << "... |
BanaanKiamanesh/Evo-Copter | Motor-Kill/setSpeed.cpp | #include <iostream>
#include <wiringPi.h>
#include <wiringPiI2C.h>
#include "PCA9685.h"
#define MIN_PWM 2048
#define MAX_PWM 4095
int main(int argc, char **argv)
{
if (argc == 2)
{
PCA9685 pca;
pca.setPWMFreq(500);
int speed = std::stoi(argv[1]);
for (int i = 1; i <= 16; i++)... |
BanaanKiamanesh/Evo-Copter | IMU-test/BNO055.cpp | #include <iostream>
#include <wiringPi.h>
#include <wiringPiI2C.h>
#include <cmath>
#include <inttypes.h>
#include <stdlib.h>
#include "BNO055.h"
void BNO055::init() // Funtion to primarily Init the operation and power registers
{
I2C_FD = wiringPiI2CSetup(BNO055_ADDR);
wiringPiI2CWriteReg8(I2C_FD, POWER_MODE,... |
BanaanKiamanesh/Evo-Copter | PIDGainEvaluator/PID.cpp | #include "PID.h"
void PID::init(float Kp, float Ki, float Kd, float tau, float T) // Constructor
{
this->Kp = Kp;
this->Ki = Ki;
this->Kd = Kd;
this->tau = tau;
this->T = T;
// Init to Zero
integ = 0.0f;
diff = 0.0f;
prev_err = 0.0f;
prev_meas = 0.0f;
val = 0.0f;
}
float P... |
goshow-jp/Kraken | DCCIntegrations/maya/src/bob2.cpp | //
// Copyright (C) goshow
//
// File: bob2Node.cpp
//
// Dependency Graph Node: bob2
//
// Author: <NAME> 2.0
//
#include "bob2.h"
#include "FabricDFGConversion.h"
#include "FabricDFGCommands.h"
#include <FTL/AutoSet.h>
#include <string>
#include <maya/MGlobal.h>
#include <maya/MPlug.h>
#inclu... |
goshow-jp/Kraken | DCCIntegrations/maya/src/MonolithDFGCommands.cpp | #include "Foundation.h"
#include "MonolithDFGCommands.h"
MSyntax MonolithDFGReloadJSONCommand::newSyntax()
{
MSyntax syntax;
syntax.addFlag("-m", "-mayaNode", MSyntax::kString);
syntax.enableQuery(false);
syntax.enableEdit(false);
return syntax;
}
MStatus MonolithDFGReloadJSONCommand::doIt(const MArgList &... |
goshow-jp/Kraken | DCCIntegrations/maya/src/pluginMain.cpp | <reponame>goshow-jp/Kraken<gh_stars>0
//
// Copyright (C)
//
// File: pluginMain.cpp
//
// Author: Maya Plug-in Wizard 2.0
//
#define FEC_SHARED
#define FECS_SHARED
#include "Foundation.h"
#include "Test2Node.h"
#include "bob2.h"
#include <maya/MFnPlugin.h>
#include <maya/MGlobal.h>
#include <maya/M... |
goshow-jp/Kraken | DCCIntegrations/maya/src/node.tpl.cpp | <reponame>goshow-jp/Kraken
//
// Copyright (C) goshow
//
// File: {{ node.class_name }}Node.cpp
//
// Dependency Graph Node: {{ node.class_name }}
//
// Author: Maya Plug-in Wizard 2.0
//
#include "{{ node.class_name }}.h"
#include "FabricDFGConversion.h"
#include "FabricDFGCommands.h"
#include <FTL/Au... |
kamlesh-goshwami/Quasimodo | typingmasterproject.cpp | <gh_stars>0
#include<stdio.h>
#include<ctime>
#include<iostream>
#include<time.h>
#include<cstring>
using namespace std;
int t=10,level;
float accuracy,gross,net;
char name[20];
void startgame()
{
// cout<<str;
//time_t start,end;
cout<<"1.easy mode \n 2. normal mode \n 3.hard mode\n";
int p;
... |
iaomw/MedianFilter | Proc.cpp | //
// Proc.cpp
// Proc
//
// Created by <NAME> on 19/10/2016.
// Copyright © 2016 IAOMW. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
/* Libraries OPENCV */
#include "highgui.h"
#include "cv.h"
#include "opencv2/opencv.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include ... |
Sicalxy/deadbeef-lyricbar | src/utils.cpp | <reponame>Sicalxy/deadbeef-lyricbar<filename>src/utils.cpp
#include "utils.h"
#include <sys/stat.h>
#include <algorithm>
#include <cassert>
#include <cctype> // ::isspace
#include <cstring>
#include <fstream>
#include <iostream>
#include <regex>
#include <sstream>
#include <stdexcept>
#include <giomm.h>
#include <gl... |
Niyy/Piezas | Piezas.cpp | #include "Piezas.h"
#include <vector>
/** CLASS Piezas
* Class for representing a Piezas vertical board, which is roughly based
* on the game "Connect Four" where pieces are placed in a column and
* fall to the bottom of the column, or on top of other pieces already in
* that column. For an illustration of the boa... |
Niyy/Piezas | PiezasTest.cpp | <filename>PiezasTest.cpp
/**
* Unit Tests for Piezas
**/
#include <gtest/gtest.h>
#include "Piezas.h"
class PiezasTest : public ::testing::Test
{
protected:
PiezasTest(){} //constructor runs before each test
virtual ~PiezasTest(){} //destructor cleans up after tests
virtual void SetUp(){} //sets up before ea... |
marinaserranomontes/opentok-unity-sample-windows | NativePlugin/RenderPlugin/RenderPlugin.cpp | // Example low level rendering Unity plugin
#include "RenderPlugin.h"
#include "targetver.h"
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// Windows Header Files:
#include <windows.h>
#include <math.h>
#include <stdio.h>
#include <vector>
#include <string>
#include <vect... |
TaichiN/android_device_amazon_omap4-common | camera/SwFrameDecoder.cpp | <reponame>TaichiN/android_device_amazon_omap4-common
/*
* Copyright (C) Texas Instruments - http://www.ti.com/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apach... |
TaichiN/android_device_amazon_omap4-common | camera/BufferSourceAdapter.cpp | /*
* Copyright (C) Texas Instruments - http://www.ti.com/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
TaichiN/android_device_amazon_omap4-common | camera/SensorListener.cpp | <filename>camera/SensorListener.cpp
/*
* Copyright (C) Texas Instruments - http://www.ti.com/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LI... |
TaichiN/android_device_amazon_omap4-common | camera/NV12_resize.cpp | /*
* Copyright (C) Texas Instruments - http://www.ti.com/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
TaichiN/android_device_amazon_omap4-common | camera/DecoderFactory.cpp | /*
* Copyright (C) Texas Instruments - http://www.ti.com/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
TaichiN/android_device_amazon_omap4-common | camera/FrameDecoder.cpp | /*
* Copyright (C) Texas Instruments - http://www.ti.com/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
TaichiN/android_device_amazon_omap4-common | camera/OMXCameraAdapter/OMXMetadata.cpp | <filename>camera/OMXCameraAdapter/OMXMetadata.cpp<gh_stars>1-10
/*
* Copyright (C) Texas Instruments - http://www.ti.com/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:... |
TaichiN/android_device_amazon_omap4-common | camera/OMXCameraAdapter/OMXFD.cpp | <reponame>TaichiN/android_device_amazon_omap4-common
/*
* Copyright (C) Texas Instruments - http://www.ti.com/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apach... |
TaichiN/android_device_amazon_omap4-common | camera/OMXCameraAdapter/OMXDefaults.cpp | /*
* Copyright (C) Texas Instruments - http://www.ti.com/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
TaichiN/android_device_amazon_omap4-common | camera/CameraHalCommon.cpp | <gh_stars>1-10
/*
* Copyright (C) Texas Instruments - http://www.ti.com/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unles... |
TaichiN/android_device_amazon_omap4-common | libtiutils/DebugUtils.cpp | <reponame>TaichiN/android_device_amazon_omap4-common
/*
* Copyright (C) Texas Instruments - http://www.ti.com/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apach... |
TaichiN/android_device_amazon_omap4-common | camera/CameraParameters.cpp | /*
* Copyright (C) Texas Instruments - http://www.ti.com/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
ciaranm/glasgow-constraint-solver | gcs/constraints/linear_equality.hh | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_CONSTRAINTS_LINEAR_EQUALITY_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_CONSTRAINTS_LINEAR_EQUALITY_HH 1
#include <gcs/constraint.hh>
#include <gcs/integer.hh>
#include <gcs/linear.hh>
#include <vector>
namespace gcs
{
... |
ciaranm/glasgow-constraint-solver | examples/skyscrapers/skyscrapers.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/all_different.hh>
#include <gcs/constraints/arithmetic.hh>
#include <gcs/constraints/comparison.hh>
#include <gcs/constraints/linear_equality.hh>
#include <gcs/constraints/table.hh>
#include <gcs/problem.hh>
#include <gcs/solve.hh>
#include <c... |
ciaranm/glasgow-constraint-solver | examples/colour/colour.cc | <filename>examples/colour/colour.cc
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/min_max.hh>
#include <gcs/constraints/comparison.hh>
#include <gcs/problem.hh>
#include <gcs/solve.hh>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <vector>
using namespace gcs;
using... |
ciaranm/glasgow-constraint-solver | gcs/constraints/arithmetic_test.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/problem.hh>
#include <gcs/constraints/arithmetic.hh>
#include <gcs/solve.hh>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <random>
#include <set>
#include <tuple>
#include <vector>
#include <utility>
using std::cerr;
using std::e... |
ciaranm/glasgow-constraint-solver | examples/magic_series/magic_series.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/comparison.hh>
#include <gcs/constraints/linear_equality.hh>
#include <gcs/problem.hh>
#include <gcs/solve.hh>
#include <util/for_each.hh>
#include <boost/program_options.hpp>
#include <cstdlib>
#include <iostream>
#include <optional>
#inclu... |
ciaranm/glasgow-constraint-solver | gcs/literal.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/literal.hh>
#include <gcs/exception.hh>
#include <util/overloaded.hh>
#include <optional>
using namespace gcs;
using std::nullopt;
using std::optional;
using std::remove_if;
using std::string;
using std::unique;
using std::visit;
auto gcs::debug_strin... |
ciaranm/glasgow-constraint-solver | examples/odd_even_sum/odd_even_sum.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/linear_equality.hh>
#include <gcs/problem.hh>
#include <gcs/solve.hh>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
#include <boost/program_options.hpp>
using namespace gcs;
using std::cerr;
using std::cout;
usi... |
ciaranm/glasgow-constraint-solver | gcs/proof.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/proof.hh>
#include <gcs/state.hh>
#include <gcs/exception.hh>
#include <util/overloaded.hh>
#include <algorithm>
#include <bit>
#include <cstdlib>
#include <iterator>
#include <list>
#include <map>
#include <fstream>
#include <sstream>
#include <unordere... |
ciaranm/glasgow-constraint-solver | gcs/extensional.cc | <reponame>ciaranm/glasgow-constraint-solver
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/extensional.hh>
#include <gcs/state.hh>
using std::pair;
using namespace gcs;
auto gcs::propagate_extensional(const ExtensionalData & table, State & state) -> pair<Inference, PropagatorState>
{
bool change... |
ciaranm/glasgow-constraint-solver | gcs/propagators-fwd.hh | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_PROPAGATORS_FWD_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_PROPAGATORS_FWD_HH 1
namespace gcs
{
enum class PropagatorState
{
Enable,
DisableUntilBacktrack
};
}
#endif
|
ciaranm/glasgow-constraint-solver | gcs/constraints/linear_equality_test.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/problem.hh>
#include <gcs/constraints/linear_equality.hh>
#include <gcs/solve.hh>
#include "util/for_each.hh"
#include <cstdlib>
#include <functional>
#include <iostream>
#include <random>
#include <set>
#include <tuple>
#include <vector>
#include <utili... |
ciaranm/glasgow-constraint-solver | gcs/constraints/arithmetic.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/arithmetic.hh>
#include <gcs/state.hh>
#include <gcs/propagators.hh>
#include <cmath>
#include <tuple>
#include <vector>
using namespace gcs;
using std::llroundl;
using std::move;
using std::pow;
using std::tuple;
using std::vector;
templat... |
ciaranm/glasgow-constraint-solver | gcs/variable_id.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/variable_id.hh>
#include "util/overloaded.hh"
using namespace gcs;
using std::pair;
using std::string;
using std::to_string;
using std::visit;
auto gcs::debug_string(const IntegerVariableID & var) -> string
{
return visit(overloaded {
[]... |
ciaranm/glasgow-constraint-solver | gcs/constraints/table.hh | <filename>gcs/constraints/table.hh
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_CONSTRAINTS_TABLE_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_CONSTRAINTS_TABLE_HH 1
#include <gcs/constraint.hh>
#include <gcs/variable_id.hh>
#include <vector>
namespace gcs
{
cla... |
ciaranm/glasgow-constraint-solver | examples/sum_all_different/sum_all_different.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/all_different.hh>
#include <gcs/constraints/linear_equality.hh>
#include <gcs/constraints/comparison.hh>
#include <gcs/problem.hh>
#include <gcs/solve.hh>
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace gcs;
using st... |
ciaranm/glasgow-constraint-solver | gcs/constraint.hh | <gh_stars>1-10
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_CONSTRAINT_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_CONSTRAINT_HH 1
#include <functional>
#include <string>
namespace gcs
{
class Propagators;
class State;
class Constraint
{
pub... |
ciaranm/glasgow-constraint-solver | gcs/propagators.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/propagators.hh>
#include <gcs/exception.hh>
#include <gcs/extensional.hh>
#include <util/overloaded.hh>
#include <util/for_each.hh>
#include <algorithm>
#include <chrono>
#include <deque>
#include <list>
using namespace gcs;
using std::chrono::duration_... |
ciaranm/glasgow-constraint-solver | gcs/state.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/state.hh>
#include <gcs/exception.hh>
#include <gcs/problem.hh>
#include "util/overloaded.hh"
#include "util/generalise.hh"
#include <algorithm>
#include <list>
#include <map>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
... |
ciaranm/glasgow-constraint-solver | examples/langford/langford.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/all_different.hh>
#include <gcs/constraints/element.hh>
#include <gcs/constraints/comparison.hh>
#include <gcs/constraints/arithmetic.hh>
#include <gcs/problem.hh>
#include <gcs/solve.hh>
#include <cstdlib>
#include <iostream>
#include <vector... |
ciaranm/glasgow-constraint-solver | gcs/constraints/element_test.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/problem.hh>
#include <gcs/constraints/element.hh>
#include <gcs/solve.hh>
#include <util/for_each.hh>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <optional>
#include <random>
#include <set>
#include <tuple>
#include <vector>
#inc... |
ciaranm/glasgow-constraint-solver | examples/crystal_maze/crystal_maze.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/all_different.hh>
#include <gcs/constraints/arithmetic.hh>
#include <gcs/constraints/comparison.hh>
#include <gcs/constraints/abs.hh>
#include <gcs/problem.hh>
#include <gcs/solve.hh>
#include <cstdlib>
#include <iostream>
#include <string>
#i... |
ciaranm/glasgow-constraint-solver | gcs/exception.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include "gcs/exception.hh"
using namespace gcs;
using std::string;
using std::to_string;
using std::experimental::source_location;
UnexpectedException::UnexpectedException(const string & w) :
_wat("unexpected problem: " + w)
{
}
auto UnexpectedException::what(... |
ciaranm/glasgow-constraint-solver | gcs/integer_variable_state.hh | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_INTEGER_VARIABLE_STATE_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_INTEGER_VARIABLE_STATE_HH 1
#include <gcs/bits.hh>
#include <gcs/integer.hh>
#include <memory>
#include <optional>
#include <set>
#include <string>
#inclu... |
ciaranm/glasgow-constraint-solver | gcs/constraints/all_different.cc | <gh_stars>1-10
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/all_different.hh>
#include <gcs/propagators.hh>
#include <gcs/state.hh>
#include <gcs/exception.hh>
#include <util/for_each.hh>
#include <util/overloaded.hh>
#include <algorithm>
#include <functional>
#include <list>
#include <... |
ciaranm/glasgow-constraint-solver | gcs/constraints/abs.hh | <reponame>ciaranm/glasgow-constraint-solver<gh_stars>1-10
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_CONSTRAINTS_ABS_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_CONSTRAINTS_ABS_HH 1
#include <gcs/constraint.hh>
#include <gcs/variable_id.hh>
namespace gcs
{
cla... |
ciaranm/glasgow-constraint-solver | gcs/literal.hh | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_LITERAL_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_LITERAL_HH 1
#include <gcs/integer.hh>
#include <gcs/variable_id.hh>
#include <string>
#include <variant>
#include <vector>
namespace gcs
{
struct LiteralFromIntege... |
ciaranm/glasgow-constraint-solver | gcs/constraints/comparison_test.cc | <filename>gcs/constraints/comparison_test.cc<gh_stars>1-10
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/problem.hh>
#include <gcs/constraints/comparison.hh>
#include <gcs/solve.hh>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <random>
#include <set>
#include <string>
#includ... |
ciaranm/glasgow-constraint-solver | gcs/constraints/element.hh | <reponame>ciaranm/glasgow-constraint-solver<gh_stars>1-10
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_CONSTRAINTS_ELEMENT_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_CONSTRAINTS_ELEMENT_HH 1
#include <gcs/constraint.hh>
#include <gcs/variable_id.hh>
#include <vecto... |
ciaranm/glasgow-constraint-solver | gcs/stats.cc | <filename>gcs/stats.cc
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/stats.hh>
#include <algorithm>
#include <chrono>
#include <ostream>
using namespace gcs;
using std::ostream;
using std::sort;
auto gcs::operator<< (ostream & o, const Stats & s) -> ostream &
{
o << "cnfs: " << s.n_cnfs << '\n... |
ciaranm/glasgow-constraint-solver | gcs/stats.hh | <gh_stars>1-10
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_STATS_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_STATS_HH 1
#include <chrono>
#include <iosfwd>
#include <string>
#include <tuple>
#include <vector>
namespace gcs
{
struct Stats
{
unsigned ... |
ciaranm/glasgow-constraint-solver | util/overloaded.hh | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_UTIL_OVERLOADED_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_UTIL_OVERLOADED_HH 1
template <class... Ts_> struct overloaded : Ts_... { using Ts_::operator()...; };
template <class... Ts_> overloaded(Ts_ ...) -> overloaded<Ts_...>;
... |
ciaranm/glasgow-constraint-solver | gcs/problem.hh | <reponame>ciaranm/glasgow-constraint-solver
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_PROBLEM_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_PROBLEM_HH 1
#include <gcs/constraint.hh>
#include <gcs/variable_id.hh>
#include <gcs/literal.hh>
#include <gcs/proof.hh>
#inc... |
ciaranm/glasgow-constraint-solver | gcs/constraints/element.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/element.hh>
#include <gcs/constraints/comparison.hh>
#include <gcs/state.hh>
#include <gcs/propagators.hh>
#include <gcs/integer.hh>
#include <util/for_each.hh>
#include <algorithm>
using namespace gcs;
using std::max;
using std::min;
using... |
ciaranm/glasgow-constraint-solver | gcs/proof.hh | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_PROOF_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_PROOF_HH 1
#include <gcs/justification.hh>
#include <gcs/linear.hh>
#include <gcs/literal.hh>
#include <gcs/state-fwd.hh>
#include <gcs/variable_id.hh>
#include <exception... |
ciaranm/glasgow-constraint-solver | examples/n_queens/n_queens.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/comparison.hh>
#include <gcs/constraints/arithmetic.hh>
#include <gcs/problem.hh>
#include <gcs/solve.hh>
#include <util/for_each.hh>
#include <cstdlib>
#include <iostream>
#include <optional>
#include <vector>
#include <boost/program_options... |
ciaranm/glasgow-constraint-solver | gcs/linear.hh | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_LINEAR_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_LINEAR_HH 1
#include <gcs/integer.hh>
#include <gcs/variable_id.hh>
#include <gcs/state-fwd.hh>
#include <gcs/propagators-fwd.hh>
#include <gcs/proof-fwd.hh>
#include <op... |
ciaranm/glasgow-constraint-solver | gcs/problem.cc | <gh_stars>1-10
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/problem.hh>
#include <gcs/exception.hh>
#include <gcs/state.hh>
#include <gcs/propagators.hh>
#include <gcs/exception.hh>
#include <gcs/constraints/comparison.hh>
#include <util/for_each.hh>
#include <util/overloaded.hh>
using namespace gc... |
ciaranm/glasgow-constraint-solver | gcs/linear.cc | <filename>gcs/linear.cc
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/linear.hh>
#include <gcs/state.hh>
#include <gcs/proof.hh>
#include <gcs/exception.hh>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <sstream>
#include <vector>
using namespace gcs;
using std::llabs;
using std... |
ciaranm/glasgow-constraint-solver | gcs/state-fwd.hh | <filename>gcs/state-fwd.hh
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_STATE_FWD_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_STATE_FWD_HH 1
namespace gcs
{
class State;
enum class Inference
{
NoChange,
Change,
Contradiction
}... |
ciaranm/glasgow-constraint-solver | examples/money/money.cc | <filename>examples/money/money.cc
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/all_different.hh>
#include <gcs/constraints/linear_equality.hh>
#include <gcs/problem.hh>
#include <gcs/solve.hh>
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace gcs;
using std::cout... |
ciaranm/glasgow-constraint-solver | examples/qap/qap.cc | <reponame>ciaranm/glasgow-constraint-solver<gh_stars>1-10
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/all_different.hh>
#include <gcs/constraints/arithmetic.hh>
#include <gcs/constraints/linear_equality.hh>
#include <gcs/constraints/element.hh>
#include <gcs/constraints/table.hh>
#includ... |
ciaranm/glasgow-constraint-solver | gcs/solve.cc | <gh_stars>1-10
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include "gcs/solve.hh"
#include "gcs/exception.hh"
using namespace gcs;
using std::chrono::duration_cast;
using std::chrono::microseconds;
using std::chrono::steady_clock;
using std::max;
using std::nullopt;
namespace
{
auto solve_with_state(unsig... |
ciaranm/glasgow-constraint-solver | gcs/constraints/min_max.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/min_max.hh>
#include <gcs/constraints/comparison.hh>
#include <gcs/propagators.hh>
#include <gcs/exception.hh>
#include <util/for_each.hh>
using namespace gcs;
ArrayMinMax::ArrayMinMax(const std::vector<IntegerVariableID> & vars, const Intege... |
ciaranm/glasgow-constraint-solver | examples/cake/cake.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/linear_equality.hh>
#include <gcs/problem.hh>
#include <gcs/solve.hh>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
#include <boost/program_options.hpp>
using namespace gcs;
using std::cerr;
using std::cout;
usi... |
ciaranm/glasgow-constraint-solver | gcs/exception.hh | <gh_stars>1-10
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_EXCEPTION_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_EXCEPTION_HH 1
#include <exception>
#include <experimental/source_location>
#include <string>
namespace gcs
{
class UnexpectedException :
pu... |
ciaranm/glasgow-constraint-solver | gcs/problem-fwd.hh | <reponame>ciaranm/glasgow-constraint-solver<filename>gcs/problem-fwd.hh
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_PROBLEM_FWD_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_PROBLEM_FWD_HH 1
namespace gcs
{
class Problem;
}
#endif
|
ciaranm/glasgow-constraint-solver | gcs/constraints/comparison.cc | <filename>gcs/constraints/comparison.cc
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/comparison.hh>
#include <gcs/propagators.hh>
#include <gcs/state.hh>
#include <gcs/exception.hh>
#include "util/overloaded.hh"
using namespace gcs;
using std::max;
using std::min;
using std::move;
usin... |
ciaranm/glasgow-constraint-solver | examples/magic_square/magic_square.cc | <reponame>ciaranm/glasgow-constraint-solver
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/all_different.hh>
#include <gcs/constraints/comparison.hh>
#include <gcs/constraints/linear_equality.hh>
#include <gcs/problem.hh>
#include <gcs/solve.hh>
#include <cstdlib>
#include <fstream>
#inclu... |
ciaranm/glasgow-constraint-solver | gcs/constraints/linear_equality.cc | <filename>gcs/constraints/linear_equality.cc
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/linear_equality.hh>
#include <gcs/propagators.hh>
#include <gcs/linear.hh>
#include <gcs/extensional.hh>
#include <util/for_each.hh>
#include <functional>
#include <sstream>
#include <vector>
usin... |
ciaranm/glasgow-constraint-solver | gcs/constraints/table.cc | <reponame>ciaranm/glasgow-constraint-solver
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/table.hh>
#include <gcs/propagators.hh>
#include <gcs/state.hh>
#include <gcs/exception.hh>
#include <util/for_each.hh>
#include <algorithm>
#include <functional>
#include <list>
#include <map>
#inc... |
ciaranm/glasgow-constraint-solver | examples/triangle/triangle.cc | <gh_stars>1-10
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/arithmetic.hh>
#include <gcs/constraints/comparison.hh>
#include <gcs/problem.hh>
#include <gcs/solve.hh>
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace gcs;
using std::cout;
using std::endl;
using st... |
ciaranm/glasgow-constraint-solver | gcs/bits.hh | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_BITS_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_BITS_HH 1
#include <algorithm>
#include <bit>
#include <limits>
namespace gcs
{
struct Bits
{
using BitWord = unsigned long long;
static const cons... |
ciaranm/glasgow-constraint-solver | gcs/justification.hh | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_JUSTIFICATION_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_JUSTIFICATION_HH 1
#include <gcs/proof-fwd.hh>
#include <functional>
#include <variant>
namespace gcs
{
struct Guess
{
};
struct JustifyExplicitl... |
ciaranm/glasgow-constraint-solver | examples/ortho_latin/ortho_latin.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/all_different.hh>
#include <gcs/constraints/comparison.hh>
#include <gcs/constraints/arithmetic.hh>
#include <gcs/problem.hh>
#include <gcs/solve.hh>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <vector>
using namespace ... |
ciaranm/glasgow-constraint-solver | gcs/constraints/min_max.hh | <reponame>ciaranm/glasgow-constraint-solver<filename>gcs/constraints/min_max.hh
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_CONSTRAINTS_MIN_MAX_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_CONSTRAINTS_MIN_MAX_HH 1
#include <gcs/constraint.hh>
#include <gcs/variable_i... |
ciaranm/glasgow-constraint-solver | gcs/variable_id.hh | <reponame>ciaranm/glasgow-constraint-solver<filename>gcs/variable_id.hh
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_VARIABLE_ID_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_VARIABLE_ID_HH 1
#include <gcs/integer.hh>
#include <variant>
namespace gcs
{
struct Sim... |
ciaranm/glasgow-constraint-solver | gcs/solve.hh | <reponame>ciaranm/glasgow-constraint-solver
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_SOLVE_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_SOLVE_HH 1
#include <gcs/problem.hh>
#include <gcs/state.hh>
#include <gcs/stats.hh>
#include <functional>
#include <vector>
n... |
ciaranm/glasgow-constraint-solver | gcs/integer_variable_state.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/integer_variable_state.hh>
#include <util/overloaded.hh>
using namespace gcs;
using std::string;
using std::to_string;
using std::visit;
auto gcs::debug_string(const IntegerVariableState & ivar) -> string
{
return visit(overloaded {
[] (... |
ciaranm/glasgow-constraint-solver | gcs/state.hh | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_STATE_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_STATE_HH 1
#include <gcs/state-fwd.hh>
#include <gcs/integer_variable_state.hh>
#include <gcs/literal.hh>
#include <gcs/problem-fwd.hh>
#include <gcs/justification.hh>
#in... |
ciaranm/glasgow-constraint-solver | gcs/constraints/abs.cc | <filename>gcs/constraints/abs.cc<gh_stars>1-10
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/abs.hh>
#include <gcs/propagators.hh>
#include <gcs/state.hh>
#include <algorithm>
using namespace gcs;
using std::max;
using std::min;
Abs::Abs(const IntegerVariableID v1, const IntegerVariabl... |
ciaranm/glasgow-constraint-solver | examples/sudoku/sudoku.cc | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/all_different.hh>
#include <gcs/constraints/comparison.hh>
#include <gcs/problem.hh>
#include <gcs/solve.hh>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <vector>
using namespace gcs;
using std::cerr;
using std::cout;
u... |
ciaranm/glasgow-constraint-solver | gcs/constraint.cc | <gh_stars>1-10
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include "gcs/constraint.hh"
using namespace gcs;
Constraint::~Constraint() = default;
|
ciaranm/glasgow-constraint-solver | examples/stable_matching/stable_matching.cc | <gh_stars>1-10
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/problem.hh>
#include <gcs/solve.hh>
#include <gcs/constraints/comparison.hh>
#include <gcs/constraints/element.hh>
#include <gcs/constraints/table.hh>
#include <util/for_each.hh>
#include <algorithm>
#include <cstdlib>
#include <functional>... |
ciaranm/glasgow-constraint-solver | gcs/extensional.hh | /* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_EXTENSIONAL_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_EXTENSIONAL_HH 1
#include <gcs/integer.hh>
#include <gcs/state-fwd.hh>
#include <gcs/variable_id.hh>
#include <gcs/propagators-fwd.hh>
#include <utility>
#include <v... |
ciaranm/glasgow-constraint-solver | gcs/proof-fwd.hh | <gh_stars>1-10
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_PROOF_FWD_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_PROOF_FWD_HH 1
namespace gcs
{
class Proof;
using ProofLine = long long;
}
#endif
|
ciaranm/glasgow-constraint-solver | examples/three_all_differents/three_all_differents.cc | <gh_stars>1-10
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/all_different.hh>
#include <gcs/problem.hh>
#include <gcs/solve.hh>
#include <cstdlib>
#include <iostream>
#include <vector>
using namespace gcs;
using std::cout;
using std::endl;
using std::pair;
using std::vector;
auto main... |
ciaranm/glasgow-constraint-solver | gcs/propagators.hh | <filename>gcs/propagators.hh<gh_stars>1-10
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_PROPAGATORS_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_PROPAGATORS_HH 1
#include <gcs/propagators-fwd.hh>
#include <gcs/linear.hh>
#include <gcs/literal.hh>
#include <gcs/problem... |
ciaranm/glasgow-constraint-solver | gcs/constraints/arithmetic.hh | <filename>gcs/constraints/arithmetic.hh
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_CONSTRAINTS_ARITHMETIC_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_CONSTRAINTS_ARITHMETIC_HH 1
#include <gcs/constraint.hh>
#include <gcs/variable_id.hh>
namespace gcs
{
enum cl... |
ciaranm/glasgow-constraint-solver | gcs/integer.hh | <reponame>ciaranm/glasgow-constraint-solver
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#ifndef GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_INTEGER_HH
#define GLASGOW_CONSTRAINT_SOLVER_GUARD_GCS_INTEGER_HH 1
#include <ostream>
#include <string>
namespace gcs
{
struct Integer
{
long long raw_value;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.