which contains the code necessary to generate an integral evaluation code
for general integral classes with the following properties:
    * primitive integrals
    * VRR-only algorithm
    * Auxiliary index (2-layer algorithm)
"""
from intception.dsl import *
from intception.generator.callables import integral_wrapper_main_function
from intception.generator.callables import integral_wrapper_work_array_size_function
from intception.generator.algo_descriptor import algo_descriptor
from intception.generator.algo_variable_setup import algo_variable_setup
from intception.generator.algo_indexing_setup import algo_indexing_setup
from . import primitive_general

### Create a specific algo_descriptor object for this algorithm ###
algo_desc = algo_descriptor( is_contracted = False, hrr_present = False, aux_index_present = True )

### Create a specific algo_indexing_setup derived class for this algorithm ###
class integral_array_indexing_setup(algo_indexing_setup):
    def __call__(self):
        """
        Setup indexing attributes for integral arrays attached to integral_wrapper
        based on specific algorithm details (sets up integral_wrapper.work_array).
        """
        wintegral = self.wintegral

        # Set work_array().array_index() initial value (zero)
        wintegral.work_array().array_index().set_expr( 0 )

        # Go through RR list to determine order of indexes in work array (for each auxiliary index
        # combination)
for general integral classes with the following properties:
    * contracted integrals
    * VRR and HRR algorithm (2-layers)
    * no auxiliary indexes
"""
from intception.dsl import *
from intception.dsl_extensions import *
from intception.generator.callables import integral_wrapper_main_function
from intception.generator.callables import integral_wrapper_work_array_size_function
from intception.generator.algo_descriptor import algo_descriptor
from intception.generator.algo_variable_setup import algo_variable_setup
from intception.generator.algo_indexing_setup import algo_indexing_setup
from . import contracted_general

### Create a specific algo_descriptor object for this algorithm ###
algo_desc = algo_descriptor( is_contracted = True, hrr_present = True, aux_index_present = False )

### Create a specific algo_indexing_setup derived class for this algorithm ###
class integral_array_indexing_setup(algo_indexing_setup):
    def __call__(self):
        """
        Setup indexing attributes for integral arrays attached to integral_wrapper
        based on specific algorithm details (sets up integral_wrapper.work_array).
        """
        wintegral = self.wintegral

        work_array_windex_index_list = []
        # Go through RR list to determine order of indexes in work array 
        work_array_windex_index_list = []
        hrr_found = False
        for wrr in wintegral.wrr_list():