Ian Jauslin
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jauslin <ian.jauslin@roma1.infn.it>2015-06-14 00:52:45 +0000
committerIan Jauslin <ian.jauslin@roma1.infn.it>2015-06-14 00:52:45 +0000
commitaa0f3ae2988d372b190b9bde2e75a6d17e744e93 (patch)
tree14482245c2fca27fcdad3078e97d0871352d52a7 /src/fields.h
Initial commitv1.2
Diffstat (limited to 'src/fields.h')
-rw-r--r--src/fields.h98
1 files changed, 98 insertions, 0 deletions
diff --git a/src/fields.h b/src/fields.h
new file mode 100644
index 0000000..3795d92
--- /dev/null
+++ b/src/fields.h
@@ -0,0 +1,98 @@
+/*
+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);
+
+
+// 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);
+
+
+// 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