Skip to content

logic

logic.and

                                                                                
 Documentation                                                                  
                          Returns 'True' if both inputs are 'True'.             
                                                                                
 Origin                                                                         
                          Authors   Markus Binsteiner (markus@frkl.io)          
                                                                                
 Context                                                                        
                          Tags         core                                     
                          Labels       package: kiara_modules.core              
                          References   source_repo:                             
                                       https://github.com/DHARPA-Project/kia…   
                                       documentation:                           
                                       https://dharpa.org/kiara_modules.core/   
                                       module_doc:                              
                                       https://dharpa.org/kiara_modules.core…   
                                       source_url:                              
                                       https://github.com/DHARPA-Project/kia…   
                                                                                
 Module config                                                                  
                          Field       Type     Description           Required   
                         ─────────────────────────────────────────────────────  
                          constants   object   Value constants for   no         
                                               this module.                     
                          defaults    object   Value defaults for    no         
                                               this module.                     
                          delay       number   the delay in          no         
                                               seconds from                     
                                               processing start to              
                                               when the output is               
                                               returned.                        
                                                                                
 Module config          -- no config --                                         
 Python class                                                                   
                          class_name    AndModule                               
                          module_name   kiara_modules.core.logic                
                          full_name     kiara_modules.core.logic.AndModule      
                                                                                
 Processing source code  ─────────────────────────────────────────────────────  
                          def process(self, inputs: ValueSet, outputs: Value…   
                                                                                
                              time.sleep(self.config.delay)  # type: ignore     
                                                                                
                              outputs.set_value(                                
                                  "y", inputs.get_value_data("a") and inputs   
                              )                                                 
                                                                                
                         ─────────────────────────────────────────────────────  
                                                                                

logic.not

                                                                                
 Documentation                                                                  
                          Negates the input.                                    
                                                                                
 Origin                                                                         
                          Authors   Markus Binsteiner (markus@frkl.io)          
                                                                                
 Context                                                                        
                          Tags         core                                     
                          Labels       package: kiara_modules.core              
                          References   source_repo:                             
                                       https://github.com/DHARPA-Project/kia…   
                                       documentation:                           
                                       https://dharpa.org/kiara_modules.core/   
                                       module_doc:                              
                                       https://dharpa.org/kiara_modules.core…   
                                       source_url:                              
                                       https://github.com/DHARPA-Project/kia…   
                                                                                
 Module config                                                                  
                          Field       Type     Description           Required   
                         ─────────────────────────────────────────────────────  
                          constants   object   Value constants for   no         
                                               this module.                     
                          defaults    object   Value defaults for    no         
                                               this module.                     
                          delay       number   the delay in          no         
                                               seconds from                     
                                               processing start to              
                                               when the output is               
                                               returned.                        
                                                                                
 Module config          -- no config --                                         
 Python class                                                                   
                          class_name    NotModule                               
                          module_name   kiara_modules.core.logic                
                          full_name     kiara_modules.core.logic.NotModule      
                                                                                
 Processing source code  ─────────────────────────────────────────────────────  
                          def process(self, inputs: ValueSet, outputs: Value…   
                              """Negates the input boolean."""                  
                                                                                
                              time.sleep(self.config.get("delay"))  # type: …   
                                                                                
                              outputs.set_value("y", not inputs.get_value_da…   
                                                                                
                         ─────────────────────────────────────────────────────  
                                                                                

logic.or

                                                                                
 Documentation                                                                  
                          Returns 'True' if one of the inputs is 'True'.        
                                                                                
 Origin                                                                         
                          Authors   Markus Binsteiner (markus@frkl.io)          
                                                                                
 Context                                                                        
                          Tags         core                                     
                          Labels       package: kiara_modules.core              
                          References   source_repo:                             
                                       https://github.com/DHARPA-Project/kia…   
                                       documentation:                           
                                       https://dharpa.org/kiara_modules.core/   
                                       module_doc:                              
                                       https://dharpa.org/kiara_modules.core…   
                                       source_url:                              
                                       https://github.com/DHARPA-Project/kia…   
                                                                                
 Module config                                                                  
                          Field       Type     Description           Required   
                         ─────────────────────────────────────────────────────  
                          constants   object   Value constants for   no         
                                               this module.                     
                          defaults    object   Value defaults for    no         
                                               this module.                     
                          delay       number   the delay in          no         
                                               seconds from                     
                                               processing start to              
                                               when the output is               
                                               returned.                        
                                                                                
 Module config          -- no config --                                         
 Python class                                                                   
                          class_name    OrModule                                
                          module_name   kiara_modules.core.logic                
                          full_name     kiara_modules.core.logic.OrModule       
                                                                                
 Processing source code  ─────────────────────────────────────────────────────  
                          def process(self, inputs: ValueSet, outputs: Value…   
                                                                                
                              time.sleep(self.config.get("delay"))  # type: …   
                              outputs.set_value("y", inputs.get_value_data("…   
                                                                                
                         ─────────────────────────────────────────────────────