This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <CGAL/Linear_cell_complex.h> | |
using namespace std; | |
using namespace CGAL; | |
typedef Exact_predicates_inexact_constructions_kernel K; | |
typedef Linear_cell_complex_traits<3, K> Traits; | |
typedef Linear_cell_complex<3, 3, Traits> LCC; | |
typedef Point_3<K> Point; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <CGAL/Linear_cell_complex.h> | |
#include <CGAL/Linear_cell_complex_constructors.h> | |
using namespace std; | |
using namespace CGAL; | |
typedef Exact_predicates_inexact_constructions_kernel K; | |
typedef Linear_cell_complex_traits<3, K> Traits; | |
typedef Linear_cell_complex<3, 3, Traits> LCC; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////////////////////////////////////////////////////////////////// | |
// // | |
// TetGen // | |
// // | |
// A Quality Tetrahedral Mesh Generator and A 3D Delaunay Triangulator // | |
// // | |
// Version 1.5 // | |
// May 31, 2014 // | |
// // | |
// Copyright (C) 2002--2014 // |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////////////////////////////////////////////////////////////////// | |
// // | |
// TetGen // | |
// // | |
// A Quality Tetrahedral Mesh Generator and A 3D Delaunay Triangulator // | |
// // | |
// Version 1.5 // | |
// May 31, 2014 // | |
// // | |
// Copyright (C) 2002--2014 // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*****************************************************************************/ | |
/* */ | |
/* Routines for Arbitrary Precision Floating-point Arithmetic */ | |
/* and Fast Robust Geometric Predicates */ | |
/* (predicates.c) */ | |
/* */ | |
/* May 18, 1996 */ | |
/* */ | |
/* Placed in the public domain by */ | |
/* Jonathan Richard Shewchuk */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void tetgenmesh::meshsurface() | |
{ | |
arraypool *ptlist, *conlist; | |
point *idx2verlist; | |
point tstart, tend, *pnewpt, *cons; | |
tetgenio::facet *f; | |
tetgenio::polygon *p; | |
int end1, end2; | |
int shmark, i, j; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2013 NVIDIA Corporation | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import logging | |
import tempfile | |
import numpy as np | |
import gym | |
#from gym.wrappers.monitoring import Monitor | |
class RandomAgent(object): | |
def __init__ (self, action_space): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' Gets list of furture rewards, associates discount factor with future rewards ''' | |
def discounted_future_return(rewards, gamma=0.98): | |
discounted_returns = [0 for _ in rewards] | |
discounted_returns[-1] = rewards[-1] | |
for t in range(len(rewards) - 2. -1, -1): | |
discounted_returns[t] = rewards[t] + gamma * discounted_returns[t+1] | |
return discounted_returns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import os | |
import logging | |
import tempfile | |
import numpy as np | |
import gym | |
#from gym.wrappers.monitoring import Monitor | |
class myEphsilonGreedyAgent(object): |