/* Copyright 2015 Ian Jauslin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* declaring fields */ #ifndef FIELDS_H #define FIELDS_H #include "types.h" // init int init_Fields_Table(Fields_Table* fields); int free_Fields_Table(Fields_Table fields); // determine field type int field_type(int index, Fields_Table fields); // check whether a field anticommutes int is_fermion(int index, Fields_Table fields); // check whether a field is non-commuting int is_noncommuting(int index, Fields_Table fields); // init int init_Identities(Identities* identities,int size); int free_Identities(Identities identities); // resize int resize_identities(Identities* identities,int new_size); // copy int identities_cpy(Identities input, Identities* output); int identities_cpy_noinit(Identities input, Identities* output); // append an element to a identities int identities_append(Int_Array lhs, Polynomial rhs, Identities* output); int identities_append_noinit(Int_Array lhs, Polynomial rhs, Identities* output); // concatenate two identitiess int identities_concat(Identities input, Identities* output); // resolve the identities int resolve_ids(Polynomial* polynomial, Fields_Table fields); // check whether an array is a sub-array of another, support for noncommuting elements int int_array_is_subarray_noncommuting(Int_Array input, Int_Array test_array, Fields_Table fields); // init int init_Symbols(Symbols* symbols,int size); int free_Symbols(Symbols symbols); // resize int resize_symbols(Symbols* symbols,int new_size); // copy int symbols_cpy(Symbols input, Symbols* output); int symbols_cpy_noinit(Symbols input, Symbols* output); // append an element to a symbols int symbols_append(int index, Polynomial expr, Symbols* output); int symbols_append_noinit(int index, Polynomial expr, Symbols* output); // concatenate two symbolss int symbols_concat(Symbols input, Symbols* output); // init int init_Groups(Groups* groups,int size); int free_Groups(Groups groups); // resize int resize_groups(Groups* groups,int new_size); // copy int groups_cpy(Groups input, Groups* output); int groups_cpy_noinit(Groups input, Groups* output); // append an element to a groups int groups_append(Int_Array indices, Groups* output); int groups_append_noinit(Int_Array indices, Groups* output); // concatenate two groupss int groups_concat(Groups input, Groups* output); // find which group an index belongs to int find_group(int index, Groups groups); #define FIELDS_H_DONE #endif