parameters: (self, **kwargs)
docstring: Compute the contiguity of all the districts in the plan.
  
          @keyword plan: A L{Plan} whose set of districts should be
              evaluated for contiguity.
          @keyword version: Optional. The version of the plan, defaults to
              the most recent version.
docstring_summary: Compute the contiguity of all the districts in the plan.
docstring_tokens: Compute the contiguity of all the districts in the plan .
function: def compute(self, **kwargs):
          """
          Compute the contiguity of all the districts in the plan.
  
          @keyword plan: A L{Plan} whose set of districts should be
              evaluated for contiguity.
          @keyword version: Optional. The version of the plan, defaults to
              the most recent version.
          """
          if not 'plan' in kwargs:
              return
  
          plan = kwargs['plan']
          version = kwargs['version'] if 'version' in kwargs else plan.version
          districts = plan.get_districts_at_version(version, include_geom=False)
  
          calc = Contiguity()
          calc.compute(**kwargs)
  
          self.result = {'value': (len(districts) - 1) == calc.result['value']}
function_tokens: def compute ( self , * * kwargs ) : if not 'plan' in kwargs : return plan = kwargs [ 'plan' ] version = kwargs [ 'version' ] if 'version' in kwargs else plan . version districts = plan . get_districts_at_version ( version , include_geom = False ) calc = Contiguity ( ) calc . compute ( * * kwargs ) self . result = { 'value' : ( len ( districts ) - 1 ) == calc . result [ 'value' ] }