- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
feat: Harrington implementation #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Draft
      
      
            Haadi-Khan
  wants to merge
  16
  commits into
  master
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
harrington
  
      
      
   
  
    
  
  
  
 
  
      
    base: master
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
                
     Draft
            
            
          Conversation
  
    
      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
    
  
  
    
    The variable naming scheme is abysmal — I'll reread the original codebase so I have a better idea for our implementation
Going (very far) away from the C++ impl we found. Kevin's code didn't compile so I fixed it and did some modifications to better fit our aim. All I need to do is add the "upper rank" colonies and then we can get to implementing our scheme.
Basically all the Harrington rules will be implemented through LatticeManager (at least the way I see it right now). Broadcasting and all other roles can probably be handled through it. Maybe this should be refactored at some point, but I think this is the most straightforward impl to start with.
I created three levels of lattices in order to get around the problem with having every lattice field be an Option type. All of the automata and edges are now owned by LatticeManager, in addition to the lattices. This is to resolve the issue of what owns the edges between BaseLattices. The primary and dual fields in LatticeManager own the Edges and map the Automata to their edges. The BaseLattice just has a HashMap from points to AutomatonId's, which are used to access the fields in LatticeManager. I also added some basic structure for the HarringtonRules to build on. Some of the creation/building of the LatticeManager and all of its children still needs to be implemented
There are now three separate stores for the lattices. The Lattice trait is used to insert and get lattices from the store so that they access the correct store based on the type of the lattice.
…ifetimes are terrible and I have no idea how they work, will figure out later. Also need to actually assign neighbors. I created point associated with each higher level lattice (relative to supercolony), should be able to use to assign neighbors easily (maybe make hashmap from each point to lattice id in super colony to make look up extremely easy).
…in top lattice. Again has a couple errors mostly with lifetime stuff, but think this structure should be solid. Will need more work for assigning neighbors for lower levels due to neighbors being within seperate middle lattices for lower lattices
I think that some of it stems from what owns middle_id, since it is being dropped. The mid_store of the lattice manager should own it, but create_middle_lattice may not be doing this properly.
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
No description provided.