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 numpy as np | |
import pandas as pd | |
# dropping tennis ball | |
def problem1(): | |
dt = 1 | |
F = np.matrix([[1, dt, 0], |
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
class SetNode: | |
"""disjoint set node""" | |
def __init__(self, value): | |
self.__value = value | |
self.__parent = self | |
self.__ancestor = self | |
self.__size = 1 | |
def __merge_in(self, other): |
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
class SetNode: | |
"""disjoint set node""" | |
def __init__(self, value): | |
self.__value = value | |
self.__parent = self | |
self.__size = 1 | |
def __merge_in(self, other): | |
new_size = self.parent.__size + \ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
print("Hello World!") |