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
-1 | |
1 | |
-1 | |
1 | |
-1 | |
-1 | |
1 | |
1 | |
1 | |
1 |
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
1 | |
-1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
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
/* | |
* implement with DFS | |
*/ | |
pNode getBest(pNode head, getNodeChildrenFunc getChildren, \ | |
getNodeValFunc getVal, freeNodeFunc freeNode, copyNodeFunc copy, unsigned int best) | |
{ | |
/* head */ | |
pNode* childs; | |
unsigned num_of_childs = getChildren(head, childs); | |
/* node */ |
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 <iostream> | |
#include <math.h> | |
#include <algorithm> | |
#include "Point.h" | |
#include "PointSet.h" | |
static Point minPoint; | |
PointSet& getInput() | |
{ | |
PointSet *ps = new PointSet{}; |
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
CC=g++ | |
LDLIBS=-lm | |
CFLAGS= -Wextra -g -Wall -Wvla -std=c++17 | |
TARFLAGS= -cvf | |
#TARARGS=README Makefile Point.h Point.cpp PointSet.h PointSet.cpp ConvexHull.cpp PointSetBinaryOperations.cpp | |
all: ConvexHull PointSetBinaryOperations | |
./PointSetBinaryOperations | |
tar: README Makefile Point.h Point.cpp PointSet.h PointSet.cpp ConvexHull.cpp PointSetBinaryOperations.cpp |
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
CC=g++ | |
LDLIBS=-lm | |
CFLAGS= -Wextra -Wall -Wvla -pthread -std=c++17 | |
TARFLAGS= -cvf | |
TARARGS=README Makefile Point.h Point.cpp PointSet.h PointSet.cpp ConvexHull.cpp PointSetBinaryOperations.cpp | |
all: ConvexHull PointSetBinaryOperations | |
./PointSetBinaryOperations | |
tar: $(TARARGS) |
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
// | |
// Created by liron on 9/7/17. | |
// | |
#include <memory> | |
#include "ShapeFactory.h" | |
/** | |
* Creates a shape of the given type and points. |
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
// | |
// Created by liron on 9/11/17. | |
// | |
#ifndef EX3_MATRIX_HPP | |
#define EX3_MATRIX_HPP | |
#include <vector> |
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
def parseDest(dest): | |
destTable = { | |
None: "000", | |
"M": "001", | |
"D": "010", | |
"A": "100", | |
"MD": "011", | |
"AM": "101", | |
"AD": "110", | |
"AMD": "111" |
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
def prove_instance(proof, instance): | |
""" Return a proof of the given instance of the inference rule that proof | |
proves, via the same inference rules used by proof """ | |
# Task 5.2.1 | |
instantiation_map = dict() | |
if not instance.is_instance_of(proof.statement, instantiation_map): | |
return None | |
my_lines = [] | |
for line in proof.lines: | |
my_lines.append( |