repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
maruinen/FullereneViewer | src/ShutUp.h | <filename>src/ShutUp.h
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __SHUTUP_H__
#define __SHUTUP_H__
#ifdef __GNUC__
# define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
#else
# define UNUSED(x) UNUSED_ ## x
#endif
#endif /* __SHUTUP_H__ *... |
maruinen/FullereneViewer | src/Ring.h | <reponame>maruinen/FullereneViewer
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __RING_H__
#define __RING_H__
#include "InteractiveRegularPolygon.h"
#include "List.h"
#include "Carbon.h"
extern int *pentagon_cellophane_colors;
extern int pentagon_st... |
maruinen/FullereneViewer | src/PipeHandler.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __PIPEHANDLER_H__
#define __PIPEHANDLER_H__
#include "ReadHandler.h"
#define BUFFER_SIZE 1024
class Process;
class Range;
class Collector;
class PipeHandler : public ReadHandler {
// friend classes & ... |
maruinen/FullereneViewer | src/Posture.h | <reponame>maruinen/FullereneViewer<gh_stars>0
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __POSTURE_H__
#define __POSTURE_H__
#include "Matrix3.h"
#include "Vector3.h"
class Posture {
// members
public:
Matrix3 posture;
bool fixed;
Matrix3 ... |
maruinen/FullereneViewer | src/DistanceSummaryLine.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __DISTANCESUMMARYLINE_H__
#define __DISTANCESUMMARYLINE_H__
#include "Object.h"
#include "MyString.h"
class DistanceSummaryLine : public Object {
// friend classes & functions
// members
private:
s... |
maruinen/FullereneViewer | src/Qt/ConfigurationDialog.h | <gh_stars>0
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __CONFIGURATIONDIALOG_H__
#define __CONFIGURATIONDIALOG_H__
#include <QDialog>
namespace Ui {
class ConfigurationDialog;
}
class ConfigurationDialog : public QDialog
{
Q_OBJECT
public:
... |
maruinen/FullereneViewer | src/Representations.h | <reponame>maruinen/FullereneViewer
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __REPRESENTATIONS_H__
#define __REPRESENTATIONS_H__
#include "Object.h"
#include "Set.h"
#include "Representation.h"
class Representations : public Object {
// friend ... |
maruinen/FullereneViewer | src/DistanceMatrix.h | <filename>src/DistanceMatrix.h
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __DISTANCEMATRIX_H__
#define __DISTANCEMATRIX_H__
#include <stdio.h>
#include "Object.h"
class CarbonAllotrope;
class DistanceMatrix : public Object {
// friend classes &... |
maruinen/FullereneViewer | src/Statistics.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __STATISTICS_H__
#define __STATISTICS_H__
#include "List.h"
#include "Vector3.h"
class Statistics {
// friend classes & functions
// members
private:
List<Vector3> p_samples;
int p_sum;
Vector3... |
maruinen/FullereneViewer | src/Fullerenes.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __FULLERENES_H__
#define __FULLERENES_H__
#include <limits.h>
#include "Set.h"
#include "MinimumRepresentation.h"
#include "Stack.h"
#include "Step.h"
enum StepAlgorithm {
STEP_ALGORITHM_COPY_BRANCH = 1... |
maruinen/FullereneViewer | src/AcceptHandler.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __ACCEPTHANDLER_H__
#define __ACCEPTHANDLER_H__
#include <stdio.h>
#include "ReadHandler.h"
#include "MyString.h"
#define BUFFER_SIZE 1024
#define BUFFER2_SIZE 100
class Parallel;
class Collector;
class ... |
maruinen/FullereneViewer | src/Interactive.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __INTERACTIVE_H__
#define __INTERACTIVE_H__
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include "Config.h"
#include "Object.h"
#include "Radius.h"
#include "Posture.h"
#include "Center.h"
#include... |
maruinen/FullereneViewer | src/DistanceVector.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __DISTANCEVECTOR_H__
#define __DISTANCEVECTOR_H__
#include "Object.h"
class DistanceVector : public Object {
// friend classes & functions
// members
private:
int p_distances[12];
// private too... |
maruinen/FullereneViewer | src/BoundaryCarbons.h | <gh_stars>0
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __BOUNDARYCARBONS_H__
#define __BOUNDARYCARBONS_H__
#include "Set.h"
#include "Carbon.h"
class BoundaryCarbons {
// friend classes & functions
// members
private:
Set<Carbon> p_two_ring... |
maruinen/FullereneViewer | src/Qt/TreeModel.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __TREEMODEL_H__
#define __TREEMODEL_H__
#include <QAbstractItemModel>
#include <QModelIndex>
#include <QVariant>
class TreeItem;
class TreeModel : public QAbstractItemModel
{
Q_OBJECT
public:
explic... |
maruinen/FullereneViewer | src/Interactives.h | <filename>src/Interactives.h
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __INTERACTIVES_H__
#define __INTERACTIVES_H__
#include "Object.h"
#include "List.h"
#include "InteractiveOperation.h"
#include "Interactive.h"
enum ActionLocation {
ACTION_... |
maruinen/FullereneViewer | src/Generator.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __GENERATOR_H__
#define __GENERATOR_H__
#include "Object.h"
#include "MyString.h"
enum GeneratorType {
GENERATOR_TYPE_SYMMETRIC = 1,
GENERATOR_TYPE_TUBE = 2,
GENERATOR_TYPE_ORDINARY = 3,
GENERATOR... |
maruinen/FullereneViewer | src/InteractiveLine.h | <filename>src/InteractiveLine.h
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __INTERACTIVELINE_H__
#define __INTERACTIVELINE_H__
#include "Interactive.h"
class InteractiveLine : public Interactive {
// friend classes & functions
// members
/... |
maruinen/FullereneViewer | src/ReadHandler.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __READHANDLER_H__
#define __READHANDLER_H__
#include "Object.h"
enum ReadHandlerResult {
READ_HANDLER_RESULT_CONTINUED = 0,
READ_HANDLER_RESULT_TERMINATE = -1,
READ_HANDLER_RESULT_SCHEDULE = -2,
R... |
maruinen/FullereneViewer | src/AvoidBugs.h | <reponame>maruinen/FullereneViewer
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __AVOIDBUGS_H__
#define __AVOIDBUGS_H__
#define AVOID_GLLIGHTMODEL_BUG_IN_WGL 1 // TODO 008
#endif /* __AVOIDBUGS_H__ */
/* Local Variables: */
/* mode: c++ */
/* End:... |
maruinen/FullereneViewer | src/Parallel.h | <filename>src/Parallel.h
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __PARALLEL_H__
#define __PARALLEL_H__
#include "Set.h"
#include "List.h"
#include "Host.h"
#include "Process.h"
#include "Collector.h"
#include "MyString.h"
class ReadSelector;
cl... |
maruinen/FullereneViewer | src/Queue.h | <filename>src/Queue.h
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __QUEUE_H__
#define __QUEUE_H__
#include <assert.h>
#include "DebugMemory.h"
#define QUEUE_IMPL_CONTAINER_SIZE 10
// implementation inner classes
template <class T> class QueueImpl ... |
maruinen/FullereneViewer | src/PddGfLine.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __PDDGFLINE_H__
#define __PDDGFLINE_H__
#include "Object.h"
#include "MyString.h"
class Fullerene;
class PddGfLine : public Object {
// friend classes & functions
// members
private:
int p_number_... |
maruinen/FullereneViewer | src/Set.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __SET_H__
#define __SET_H__
#include "List.h"
template <class T> class Set : public List<T> {
// friend classes & functions
// members
// private tools
private:
bool p_search(const T* element, i... |
maruinen/FullereneViewer | src/SymmetryAxisNormal.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __SYMMETRYAXISNORMAL_H__
#define __SYMMETRYAXISNORMAL_H__
#include <stdio.h>
#include "InteractiveRegularPolygon.h"
#include "CarbonAllotrope.h"
class SymmetryAxisNormal : public InteractiveRegularPolygon... |
maruinen/FullereneViewer | src/Stack.h | <gh_stars>0
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __STACK_H__
#define __STACK_H__
#include "List.h"
template <class T> class Stack : public List<T> {
// friend classes & functions
// members
// private tools
// constructors & the d... |
maruinen/FullereneViewer | src/Host.h | <gh_stars>0
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __HOST_H__
#define __HOST_H__
#include <stdio.h>
#include "Object.h"
#include "MyString.h"
#include "List.h"
#include "ObjectInt2.h"
class Host : public Object {
// friend classes & function... |
maruinen/FullereneViewer | src/ReadKqueue.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __READKQUEUE_H__
#define __READKQUEUE_H__
#include "ReadSelector.h"
class ReadKqueue : public ReadSelector {
// friend classes & functions
// members
// private tools
// constructors & the dest... |
maruinen/FullereneViewer | src/Config.h | <reponame>maruinen/FullereneViewer
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __CONFIG_H__
#define __CONFIG_H__
/* ca-modeling の POVRay アニメーションで法線を表示する。 */
// #define CONFIG_DRAW_NORMAL_VECTOR_IN_POVRAY_ANIMATION 1
/* FullereneViewer の POVRay 6面展開... |
maruinen/FullereneViewer | src/List.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __LIST_H__
#define __LIST_H__
#include "DebugMemory.h"
template <class T> class List {
// friend classes & functions
// members
protected:
int p_container_size;
int p_length;
T** p_container;
... |
maruinen/FullereneViewer | src/Qt/AboutWindow.h | <gh_stars>0
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __ABOUTWINDOW_H__
#define __ABOUTWINDOW_H__
#include <QMainWindow>
namespace Ui {
class AboutWindow;
}
class AboutWindow : public QMainWindow
{
Q_OBJECT
public:
explicit AboutWindow(... |
maruinen/FullereneViewer | src/Version.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __VERSION_H__
#define __VERSION_H__
#include <stdio.h>
#define FULLERENE_VIEWER_VERSION "1.4.1"
extern void print_version(const char* program_name, FILE* output = 0);
#endif /* __VERSION_H__ */
/* Loca... |
maruinen/FullereneViewer | src/ObjectString.h | <gh_stars>0
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __OBJECTSTRING_H__
#define __OBJECTSTRING_H__
#include "Object.h"
#include "MyString.h"
class ObjectString : public Object, MyString {
// friend classes & functions
// members
// priva... |
maruinen/FullereneViewer | src/MyString.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __MYSTRING_H__
#define __MYSTRING_H__
class MyString {
/* 実装は必ず領域を作る。*/
/* 途中にヌル文字があってもよい。*/
/* 常にヌルターミネートしているので、途中にヌル文字がなければ文字列として扱える。*/
/* p_glow_to() と p_glow_and_copy() がヌルターミネートしていることを保証する。*/
... |
maruinen/FullereneViewer | src/MinimumRepresentation.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __MINIMUMREPRESENTATION_H__
#define __MINIMUMREPRESENTATION_H__
#include "Object.h"
#include "MyString.h"
class Fullerene;
class MinimumRepresentation : public Object {
// friend classes & functions
... |
maruinen/FullereneViewer | src/Quaternion.h | <reponame>maruinen/FullereneViewer<filename>src/Quaternion.h
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __QUATERNION_H__
#define __QUATERNION_H__
class Vector3;
class Quaternion {
// friend classes & functions
friend class Matrix3;
// membe... |
maruinen/FullereneViewer | src/Automorphism.h | <reponame>maruinen/FullereneViewer
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __AUTOMORPHISM_H__
#define __AUTOMORPHISM_H__
#include "Object.h"
class Carbon;
class Bond;
class CarbonAllotrope;
class Automorphism : public Object {
// friend clas... |
maruinen/FullereneViewer | src/Collector.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __COLLECTOR_H__
#define __COLLECTOR_H__
#include "Object.h"
#include "MyString.h"
#include "ObjectString.h"
#include "ObjectInt.h"
#include "Set.h"
#include "List.h"
#include "Range.h"
#include "Process.h"... |
maruinen/FullereneViewer | src/ObjectInt2.h | <reponame>maruinen/FullereneViewer
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __OBJECTINT2_H__
#define __OBJECTINT2_H__
#include "Object.h"
class ObjectInt2 : public Object {
// friend classes & functions
// members
private:
int p_key;
in... |
maruinen/FullereneViewer | src/Characteristic.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __CHARACTERISTIC_H__
#define __CHARACTERISTIC_H__
#include <stdio.h>
#include "DistanceVector.h"
#include "Set.h"
#include "Object.h"
class CarbonAllotrope;
class Characteristic : public Object {
// fr... |
maruinen/FullereneViewer | src/CarbonAllotrope.h | /*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __CARBONALLOTROPE_H__
#define __CARBONALLOTROPE_H__
#include <stdio.h>
#include "Interactives.h"
#include "List.h"
#include "Ring.h"
#include "Carbon.h"
#include "Bond.h"
#include "ConnectedBoundary.h"
#i... |
maruinen/FullereneViewer | src/Qt/HelpBrowser.h | <reponame>maruinen/FullereneViewer<gh_stars>0
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __HELPBROWSER_H__
#define __HELPBROWSER_H__
#include <QtWidgets>
class QWebView;
QT_BEGIN_NAMESPACE
class QLineEdit;
QT_END_NAMESPACE
class HelpBrowser : pub... |
maruinen/FullereneViewer | src/Configuration.h | <filename>src/Configuration.h<gh_stars>0
/*
* Project: FullereneViewer
* Version: 1.0
* Copyright: (C) 2011-14 Dr.Sc.KAWAMOTO,Takuji (Ext)
*/
#ifndef __CONFIGURATION_H__
#define __CONFIGURATION_H__
#include "MyString.h"
#define CONFIGURATION_FILE_NAME "/.FullereneViewer.conf"
#define WORKING_FOLDER_NAME "/fuller... |
a-kolosov/PieChartView | ChartSDK/Supporting Files/ChartSDK.h | //
// ChartSDK.h
// ChartSDK
//
// Created by <NAME> on 12/2/19.
// Copyright © 2019 <NAME>. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for ChartSDK.
FOUNDATION_EXPORT double ChartSDKVersionNumber;
//! Project version string for ChartSDK.
FOUNDATION_EXPORT const unsigned... |
koala999cn/kGraph | src/core/KtConnected.h | <filename>src/core/KtConnected.h
#pragma once
#include "KtBfsIter.h"
// 无向图的连通分量
template<typename GRAPH>
class KtConnected
{
static_assert(!GRAPH::isDigraph(), "KtConnected cannot work for digraph.");
public:
KtConnected(const GRAPH& g)
: count_(0),
cc_(g.order(), -1) {
... |
koala999cn/kGraph | src/util/resort.h | <reponame>koala999cn/kGraph
#pragma once
#include <vector>
#include <assert.h>
#include "../core/KtAdjIter.h"
// 对图g的顶点按照order进行重排序,即g[v]变为g[order[v]]
// GRAPH - 图类型
// ORDER - 具[]操作符的类型
template<class GRAPH, class ORDER>
void resort(GRAPH& g, const ORDER& order)
{
using edge_type = typename GRAPH... |
koala999cn/kGraph | src/core/KtMinSpanTree.h | <filename>src/core/KtMinSpanTree.h<gh_stars>0
#pragma once
#include <vector>
#include <algorithm>
#include "KtWeightor.h"
#include "KtBfsIter.h"
#include "../base/union_find_set.h"
// 最小生成树:加权图的最小生成树是一颗生成树,其权(所有边的权值之和)不会大于其它任何生成树的权。
template<typename GRAPH, typename WEIGHTOR>
class KtMst
{
static_... |
koala999cn/kGraph | src/core/KtAdjGraphSparseImpl.h | <reponame>koala999cn/kGraph
#pragma once
#include "KtAdjGraphBase.h"
#include "edge_traits.h"
#include "graph_traits.h"
#include <assert.h>
// 基于稀疏阵的邻接矩阵图实现
namespace kPrivate
{
// 基于vector的稀疏矩阵
template<typename EDGE_TYPE>
using underly_edge_t = edge_has_to_t<EDGE_TYPE>;
template<typename EDGE_TYPE... |
koala999cn/kGraph | src/core/KtDfsIterX.h | <reponame>koala999cn/kGraph
#pragma once
#include "KtDfsIter.h"
// KtDfsIter的加强版,总是stopAtPopping,主要新增2项新功能支持:
// 一是新增顶点的最小前序编号支持(low值),表示该顶点为根的子树中任何回边所引用的最小前序编号(order值)
// 二是新增判断当前顶点与其父顶点是否为桥的支持
// low值定义: low(v) = min(pushOrder[v], low[w], pushOrder[k])
// 式中:w是顶点v的孩子节点,k是顶点v的回边祖先节点
template<typenam... |
koala999cn/kGraph | src/util/loop.h | #pragma once
#include "../core/KtDfsIter.h"
template<typename GRAPH>
bool has_self_loop(const GRAPH& g)
{
auto V = g.order();
for(decltype(V) i = 0; i < V; i++)
if(g.hasEdge(i, i))
return true;
return false;
}
// 删除自环
template<typename GRAPH>
void erase_self_loop(GRAPH& g)
{
... |
koala999cn/kGraph | src/core/KtTransitiveClosure.h | <gh_stars>0
#pragma once
#include <type_traits>
#include <assert.h>
#include "../GraphX.h"
#include "KtDfsIter.h"
#include "KtStronglyConnected.h"
// 计算图的闭包的基类
// @useSpare: 是否使用稀疏图保存闭包结果
// TODO: 闭包结果不包含路径信息和权值信息
template<typename GRAPH, bool useSpare>
class KtTcAbstract
{
public:
using vertex_ind... |
koala999cn/kGraph | src/util/reachable.h | <reponame>koala999cn/kGraph
#pragma once
#include "../core/KtBfsIter.h"
// 顶点v是否可达w,即是否存在一条从v到w的路径
template<typename GRAPH>
bool is_reachable(const GRAPH& g, unsigned v, unsigned w)
{
KtBfsIter<const GRAPH> iter(g, v);
for (; !iter.isEnd(); ++iter)
if (*iter == w)
return true;
return false;
}
// 设置v可达的顶点标... |
koala999cn/kGraph | src/core/KtPfsIter.h | #pragma once
#include <queue>
#include <assert.h>
#include "KtAdjIter.h"
// 基于优先队列的图遍历
// PRIORITOR - 计算优先度的函数子,输入参数为:from, to, value
// COMP - 比较优先度的函数子
template <typename GRAPH, typename PRIORITOR, typename COMP, bool fullGraph = false>
class KtPfsIter
{
public:
using edge_type = typename GRA... |
koala999cn/kGraph | src/util/is_connected.h | #pragma once
#include "../core/KtBfsIter.h"
// 判断是否连通图
template<typename GRAPH>
bool is_connected(const GRAPH& g)
{
KtBfsIter<const GRAPH> iter(g, 0);
decltype(g.order()) V(0);
for (; !iter.isEnd(); ++iter)
++V;
return V == g.order();
} |
koala999cn/kGraph | src/core/KtDfsIter.h | <reponame>koala999cn/kGraph<gh_stars>0
#pragma once
#include <vector>
#include <assert.h>
// 统一有向图与无向图的深度优先遍历模板框架,通过模板参数可支持多种遍历范式。
// 模板参数:
// -- stopAtPopping,若为true,则每个顶点出栈时迭代器暂停,用户有机会处理出栈顶点.
// -- fullGraph,参见KtBfsIter.
// -- modeEdge,参见KtBfsIter.
// 当modeEdge为true, stopAtPopping为false时,则实质为边迭代器... |
koala999cn/kGraph | src/base/KtMatrix.h | #pragma once
#include <vector>
#include <assert.h>
#include "KtRange.h"
// 一个简单的矩阵模板实现
template<typename T>
class KtMatrix
{
public:
using container = std::vector<T>;
using value_type = typename container::value_type;
using reference = typename container::reference;
using const_reference... |
koala999cn/kGraph | src/core/KtBfsIter.h | <reponame>koala999cn/kGraph<filename>src/core/KtBfsIter.h
#pragma once
#include <queue>
#include <assert.h>
#include "KtAdjIter.h"
// 广度优先遍历
// 模板参数:
// -- fullGraph,若为true,则进行全图迭代,否则仅迭代与v相联通的节点或边。
// -- modeEdge,若为true,则对边进行广度优先遍历,这时顶点可能会多次重复,但每条边只会遍历一次。
// 若为false,则对顶点进行广度优先遍历,这时不能保证... |
koala999cn/kGraph | src/core/KtShortestPath.h | #pragma once
#include <vector>
#include "KtWeightor.h"
#include "KtBfsIter.h"
#include "KtDfsIter.h"
#include "KtTopologySort.h"
// 最短路径算法
// 此类算法的关键是顶点处理的顺序,对应有顺序遍历、Dfs、Bfs、Pfs、Ts等方法。
// 不同实现的时间复杂度如下:
// 单源:
// Dijkstra,适用于非负权值,O(V^2),稠密图最优
// PFS,适用于非负权值,O(E*lgV),保守边界值
// TS,适用于无环图,O(E),最优
// ... |
koala999cn/kGraph | src/util/dump.h | <gh_stars>0
#include <ostream>
#include "../base/traits_helper.h"
// dump graph "g" to file "path"
template<typename GRAPH>
void dump(const GRAPH& g, std::ostream& os)
{
auto V = static_cast<unsigned>(g.order());
for (unsigned i = 0; i < V; i++) {
unsigned jMin = g.isDigraph() ? 0 : i;
for (un... |
koala999cn/kGraph | src/core/KtWeightor.h | <gh_stars>0
#pragma once
#include <limits>
#undef max
// 与权值有关的操作:包括从边值到权值的转换,权值的比较,权值的累加
template<typename VALUE_TYPE>
class KtWeightSelf
{
public:
using weight_type = VALUE_TYPE;
weight_type operator()(const VALUE_TYPE& val) const {
return val;
}
};
template<typename VALUE_T... |
koala999cn/kGraph | src/util/randgen.h | <filename>src/util/randgen.h
#pragma once
#include <cmath>
#include "../core/KtGraph.h"
// 返回[x0, x1]区间的随机数
inline double rand(double x0, double x1)
{
return x0 + (x1 - x0) * rand() / RAND_MAX;
}
// 以p的概率返回true.
// 0 <= p <= 1
inline bool rand_p(double p)
{
return rand() <= RAND_MAX * p;
}
... |
koala999cn/kGraph | src/util/is_same.h | #pragma once
#include <algorithm>
#include "../core/graph_traits.h"
// 判断两个图g1、g2的拓扑结构是否相同,不对顶点对象进行比较
// 假定顶点顺序一致
template<typename G1, typename G2>
bool is_topo_same(const G1& g1, const G2& g2)
{
if (g1.order() != g2.order() || g1.size() != g2.size())
return false;
for (unsigned v = 0; ... |
koala999cn/kGraph | test/test_util.h | <gh_stars>0
#pragma once
#include <fstream>
#include <string>
#include <vector>
#include "../src/util/dump.h"
// dump graph "g" to file "path"
template<typename GRAPH>
void dump(const GRAPH& g, const char* path)
{
std::ofstream of(path);
dump(g, of);
}
// 测试失败时调用该函数打印信息、退出程序
template<typename GRAPH>
void te... |
koala999cn/kGraph | src/base/KtRange.h | <reponame>koala999cn/kGraph<gh_stars>0
#pragma once
#include <algorithm>
template<typename ITER_TYPE>
class KtRange
{
public:
using iterator = ITER_TYPE;
using const_iterator = ITER_TYPE; // std::add_const_t<iterator>;
using element_type = decltype(*std::declval<iterator>());
using const_el... |
koala999cn/kGraph | src/GraphX.h | <filename>src/GraphX.h
#pragma once
#include "core/KtAdjGraphDenseImpl.h"
#include "core/KtAdjGraphSparseImpl.h"
#include "core/KtFlatGraphVectorImpl.h"
#include "core/KtGraph.h"
#include "core/KtAdjIter.h"
#include "core/KtBfsIter.h"
#include "core/KtDfsIter.h"
#include "core/KtPfsIter.h"
// 对一些常用迭代器的封装
... |
koala999cn/kGraph | src/core/KtMaxFlow.h | <gh_stars>0
#pragma once
#include <vector>
#include <assert.h>
#include "KtWeightor.h"
#include "KtShortestPath.h"
#include "KtBfsIter.h"
#include "../util/copy.h"
#include "../GraphX.h"
// 最大流:给定一个st-网,找出一个流,从而使得从s到t的任何其他流都不会有更大的流值。
// 主要有两大类算法:一是扩充路径最大流算法,二是预流-压入最大流算法
// 以上两大类算法均依赖于【余留网(residual netwo... |
koala999cn/kGraph | src/core/KtStronglyConnected.h | <filename>src/core/KtStronglyConnected.h<gh_stars>0
#pragma once
#include <vector>
#include "KtDfsIterX.h"
#include "KtTopologySort.h"
#include "../util/inverse.h"
/*
对于一个有向图顶点的子集S,如果在S内任取两个顶点u和v,都能找到一条从u到v的路径,那么S是强连通的。
如果在强连通的顶点集合S中加入其他任意顶点,它都不再是强连通的,那么S是原图的一个强连通分量(SCC:Strongly Connected Component)。
任意有... |
koala999cn/kGraph | src/core/KtTopologySort.h | #pragma once
#include "KtDfsIter.h"
#include <assert.h>
#include <queue>
// 基于源点(入度为0的顶点)队列的拓扑排序算法
// 拓扑排序的2种定义:
// 1.重新编号:对DAG顶点重新编号从而使每条边由较小编号顶点指向较大编号顶点
// 2.重新整理:将DAG顶点在一条水平线上重新整理,从而使所有边均由左指向右
// 以上两种定义是等价和互逆的,若已知重新整理ts,则重新编号计算方法如下:tsI[ts[v]] = v
// 同样,若已知重新编号tsI,则重新整理计算方法如下:ts[tsI[v]] = v
template... |
koala999cn/kGraph | src/util/copy.h | <filename>src/util/copy.h<gh_stars>0
#pragma once
#include <assert.h>
#include "../core/KtWeightor.h"
template<typename SRC_G, typename DST_G,
typename WEIGHTOR = KtWeightSelf<typename SRC_G::edge_type>>
DST_G copy(const SRC_G& src)
{
DST_G dst;
dst.reserve(src.order(), src.size());
dst.reset(src.ord... |
koala999cn/kGraph | src/core/KtBipartite.h | <filename>src/core/KtBipartite.h<gh_stars>0
#pragma once
#include <assert.h>
#include "KtDfsIter.h"
// 二分图判定
// 若返回true,表示THIS是二分图,res元素值为1或者2,分别代表对应节点在不同分图
// 若返回false,表示THIS非二分图,res值等于-1的元素为冲突顶点
template<typename GRAPH>
class KtBipartite
{
static_assert(!GRAPH::isDigraph(), "KtBipartite cannot instan... |
koala999cn/kGraph | src/core/KtGraph.h | <gh_stars>0
#pragma once
#include <algorithm>
#include <set>
#include "graph_traits.h"
#include "vertex_traits.h"
#include "edge_traits.h"
#include "../base/KtCondRange.h"
#include "KtAdjIter.h"
namespace kPrivate
{
template<bool reshapable, bool immutable>
struct graph_level {
constexpr static const int value = ... |
willyu-elastic/SimpleEndpoint | SimpleEndpointApp/SimpleEndpointApp/SystemRequestDelegate.h | #pragma once
#import <Availability.h>
#import <NetworkExtension/NetworkExtension.h>
#import <SystemExtensions/SystemExtensions.h>
@interface SystemExtensionLoadRequestDelegate : NSObject<OSSystemExtensionRequestDelegate>
///
/// @brief This static method will pull the bundle instance of our system extension
/// ... |
willyu-elastic/SimpleEndpoint | SharedIPC/SharedIPC.h | <reponame>willyu-elastic/SimpleEndpoint<gh_stars>10-100
#pragma once
#import <Foundation/Foundation.h>
typedef NS_ENUM(NSUInteger,
NetworkEventDataTypes) {
NetworkEventDataTypesNone = 0,
RemoteAddress = 1,
LocalAddress = 2,
LocalPort = 3,
RemotePort ... |
willyu-elastic/SimpleEndpoint | launchDaemon/launchDaemon/ESHooks.h | <gh_stars>10-100
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
bool InstallHooks(void);
bool UninstallHooks(void);
#ifdef __cplusplus
}
#endif
|
willyu-elastic/SimpleEndpoint | SimpleEndpointApp/SimpleEndpointExtension/FilterDataProvider.h | //
// FilterPacketProvider.h
// SimpleEndpointExtension
//
// Created by will on 2/5/20.
// Copyright © 2020 YourCompanyHere. All rights reserved.
//
#import <NetworkExtension/NetworkExtension.h>
@interface FilterDataProvider : NEFilterDataProvider
@end
|
TfEL/sturdy-dollop | TextMutationTests/ViewController.h | //
// ViewController.h
// TextMutationTests
//
// Created by <NAME> on 24/07/2015.
// Copyright (c) 2015 Department for Education and Child Development. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@property (weak, nonatomic) IBOutlet UITextView *textView;
@end
|
TfEL/sturdy-dollop | TextMutationTests/settingsTableViewController.h | //
// settingsTableViewController.h
// TextMutationTests
//
// Created by <NAME> on 24/07/2015.
// Copyright (c) 2015 Department for Education and Child Development. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface settingsTableViewController : UITableViewController
@property (weak, nonatomic) IBOutlet ... |
TfEL/sturdy-dollop | TextMutationTests/webViewController.h | <gh_stars>0
//
// webViewController.h
// TextMutationTests
//
// Created by <NAME> on 24/07/2015.
// Copyright (c) 2015 Department for Education and Child Development. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface webViewController : UIViewController
@property (weak, nonatomic) IBOutlet UIWebView *w... |
bswags/web3swift | Sources/libscrypt/libscrypt.c | <gh_stars>0
//
// libscrypt.c
// libscrypt
//
// Created by <NAME> on 11/10/21.
// Copyright © 2021 web3swift. All rights reserved.
//
#include "b64.h"
#include "crypto_scrypt-hexconvert.h"
#include "libscrypt.h"
|
haobinnan/CrystalDiskInfo | FontSelectionDlg.h | /*---------------------------------------------------------------------------*/
// Author : hiyohiyo
// Mail : <EMAIL>
// Web : https://crystalmark.info/
// License : The MIT License
/*---------------------------------------------------------------------------*/
#pragma once
#include "afx... |
haobinnan/CrystalDiskInfo | Priscilla/ListCtrlFx.h | /*---------------------------------------------------------------------------*/
// Author : hiyohiyo
// Mail : <EMAIL>
// Web : https://crystalmark.info/
// License : The MIT License
/*---------------------------------------------------------------------------*/
#pragma once
#include "Com... |
haobinnan/CrystalDiskInfo | Priscilla/MainDialogFx.h | <filename>Priscilla/MainDialogFx.h
/*---------------------------------------------------------------------------*/
// Author : hiyohiyo
// Mail : <EMAIL>
// Web : https://crystalmark.info/
// License : The MIT License
/*-----------------------------------------------------------------------... |
cben-bar/42-pipex | srcs/ft_strnstr.c | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strnstr.c :+: :+: :+: ... |
cben-bar/42-pipex | srcs/utils.c | <filename>srcs/utils.c<gh_stars>0
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* utils.c ... |
cben-bar/42-pipex | includes/pipex.h | <reponame>cben-bar/42-pipex<gh_stars>0
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pipex.h ... |
cben-bar/42-pipex | srcs/ft_strjoin.c | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strjoin.c :+: :+: :+: ... |
cben-bar/42-pipex | srcs/pipex.c | <reponame>cben-bar/42-pipex
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* pipex.c ... |
kellsnc/sadx-limit-break | limit-break/clip.h | #pragma once
// Current clip distance - cannot exceed clip_current
extern float clip_current;
// Clip distance upper limit
extern float clip_limit;
// Minimum recorded clip distance above clip_default
extern float clip_min;
// Maximum recorded clip distance
extern float clip_max;
// Default SADX object clip distance
... |
kellsnc/sadx-limit-break | limit-break/stdafx.h | #pragma once
#include <SADXModLoader.h>
#include <Trampoline.h>
#include <vector>
#include <deque>
#include <cstdint>
#include "object.h"
#include "clip.h"
#include "collision.h"
#include "textures.h"
#include "set.h"
#include "objdef.h" |
kellsnc/sadx-limit-break | limit-break/textures.h | #pragma once
void textures_init();
void textures_OnFrame();
|
kellsnc/sadx-limit-break | limit-break/misc.h | #pragma once
// from: https://github.com/nihilus/hexrays_tools/blob/master/code/defs.h
#define _LOBYTE(x) (*((Uint8*)&(x))) // low byte
#define BYTEn(x, n) (*((Uint8*)&(x)+n))
#define BYTE1(x) BYTEn(x, 1) // byte 1 (counting from 0)
|
kellsnc/sadx-limit-break | limit-break/set.h | <gh_stars>1-10
#pragma once
void set_init();
|
kellsnc/sadx-limit-break | limit-break/objdef.h | #pragma once
void objdef_init(); |
kellsnc/sadx-limit-break | limit-break/object.h | <filename>limit-break/object.h
#pragma once
void object_init();
void object_OnFrame();
|
kellsnc/sadx-limit-break | limit-break/collision.h | #pragma once
void collision_init();
|
Kashish410/Project-alpha | C/LeapYear.c | #include <stdio.h>
int main(void) {
int year;
scanf("%d", &year);
if(year % 4 == 0){
if(year % 100 != 0){
printf("Yes, %d is a leap year!", year);
}
else if(year % 400 != 0){
printf("No, %d is not a leap year!", year);
}
else{
printf("Yes, %d ... |
Kashish410/Project-alpha | transpose_of_matrix.c | <filename>transpose_of_matrix.c<gh_stars>0
#include <stdio.h>
int main() {
int a[10][10], transpose[10][10], r, c, i, j;
scanf("%d %d", &r, &c);
for (i = 0; i < r; ++i)
for (j = 0; j < c; ++j) {
scanf("%d", &a[i][j]);
}
// Finding the transpose of matrix... |
wotsen/util_phread | test.c | /**
* @file test.c
* @author 余王亮 (<EMAIL>)
* @brief
* @version 0.1
* @date 2019-11-02
*
* @copyright Copyright (c) 2019
*
*/
#include <unistd.h>
#include "util_pthread.h"
void *test(void *arg)
{
set_thread_name("test");
while (1)
{
printf("..................\n");
sleep(3);
}
}
int main(void)
{
pt... |
wotsen/util_phread | include/util_pthread.h | <reponame>wotsen/util_phread<gh_stars>0
/**
* @file util_pthread.h
* @author 余王亮 (<EMAIL>)
* @brief
* @version 0.1
* @date 2019-11-02
*
* @copyright Copyright (c) 2019
*
*/
#ifndef __UTIL_PTHREAD_H__
#define __UTIL_PTHREAD_H__
#include <pthread.h>
#include <stdio.h>
#include <stdbool.h>
#define INVALID_PT... |
wotsen/util_phread | src/util_pthread.c | /**
* @file util_pthread.c
* @author 余王亮 (<EMAIL>)
* @brief
* @version 0.1
* @date 2019-11-02
*
* @copyright Copyright (c) 2019
*
*/
#include <string.h>
#include <errno.h>
#include <signal.h>
#include <sys/prctl.h>
#include "util_pthread.h"
/**
* @brief 创建线程
*
* @param tid 线程id
* @param stacksize 线程栈大... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.