Ian Jauslin
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jauslin <ian@jauslin.org>2022-06-14 09:26:07 +0200
committerIan Jauslin <ian@jauslin.org>2022-06-14 09:46:36 +0200
commit3f0510629e422e979b57d3f93791937912a4183a (patch)
treebf2589b2689044261b0cd4d9e6b3082194fdd9e9 /src/meantools.c
parent469bdc80712dbf9c12562059dc4594620b59a076 (diff)
Update to v1.5.HEADmaster
The update to version 1.5 is rather substantial, and introduces some minor backward-incompatibilities: * The header "#!symbols" has been replaced by "#!virtual_fields" * Multiplying polynomials using the '*' symbol is no longer supported (or, rather, the symbolic capabilities of meankondo were enhanced, and the syntax has been changed). * 'meantools exp' has been removed (its functionality is now handled by other means) * 'meantoolds derive' has been replaced by 'meantools differentiate' * The symbolic capabilities were enhanced: polynomials can now be multiplied, added, exponentiated, and their logarithms can be taken directly in the configuration file. * The flow equation can now be processed after being computed using the various "#!postprocess_*" entries. * Deprecated kondo_preprocess. * Compute the mean using an LU decomposition if possible. * More detailed checks for syntax errors in configuration file. * Check that different '#!group' entries are indeed uncorrelated. * New flags in meankondo: '-p' and '-A'. * New tool: meantools expand. * Improve conversion to LaTeX using meantools-convert * Assign terms randomly to different threads. * Created vim files to implement syntax highlighting for configuration files. * Multiple bug fixes
Diffstat (limited to 'src/meantools.c')
-rw-r--r--src/meantools.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/meantools.c b/src/meantools.c
index e3e7247..64cf3f1 100644
--- a/src/meantools.c
+++ b/src/meantools.c
@@ -1,5 +1,5 @@
/*
-Copyright 2015 Ian Jauslin
+Copyright 2015-2022 Ian Jauslin
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -39,13 +39,13 @@ Utility to perform various operations on flow equations
// string functions
#include "istring.h"
// tools
-#include "meantools_exp.h"
#include "meantools_deriv.h"
#include "meantools_eval.h"
+#include "meantools_expand.h"
-#define EXP_COMMAND 1
-#define DERIV_COMMAND 2
-#define EVAL_COMMAND 3
+#define DERIV_COMMAND 1
+#define EVAL_COMMAND 2
+#define EXPAND_COMMAND 3
// read cli arguments
int read_args_meantools(int argc,const char* argv[], Str_Array* str_args, Meantools_Options* opts);
@@ -63,12 +63,12 @@ int main (int argc, const char* argv[]){
read_args_meantools(argc,argv,&str_args, &opts);
switch(opts.command){
- case EXP_COMMAND: tool_exp(str_args);
- break;
case DERIV_COMMAND: tool_deriv(str_args,opts);
break;
case EVAL_COMMAND: tool_eval(str_args,opts);
break;
+ case EXPAND_COMMAND: tool_expand(str_args,opts);
+ break;
}
//free memory
@@ -86,11 +86,7 @@ int read_args_meantools(int argc,const char* argv[], Str_Array* str_args, Meanto
exit(-1);
}
- if(str_cmp((char*)argv[1],"exp")==1){
- (*opts).command=EXP_COMMAND;
- tool_exp_read_args(argc, argv, str_args);
- }
- else if(str_cmp((char*)argv[1],"derive")==1){
+ if(str_cmp((char*)argv[1],"differentiate")==1){
(*opts).command=DERIV_COMMAND;
tool_deriv_read_args(argc, argv, str_args, opts);
}
@@ -98,6 +94,10 @@ int read_args_meantools(int argc,const char* argv[], Str_Array* str_args, Meanto
(*opts).command=EVAL_COMMAND;
tool_eval_read_args(argc, argv, str_args, opts);
}
+ else if(str_cmp((char*)argv[1],"expand")==1){
+ (*opts).command=EXPAND_COMMAND;
+ tool_expand_read_args(argc, argv, str_args, opts);
+ }
else{
print_usage_meantools();
exit(-1);
@@ -108,9 +108,6 @@ int read_args_meantools(int argc,const char* argv[], Str_Array* str_args, Meanto
// print usage message
int print_usage_meantools(){
- printf("\nusage:\n meantools exp [config_file]\n meantools derive [-d derivatives] [-V variables] [-C] [config_file]\n meantools eval [-R values] [-P precision] [-E max_exponent] [config_file]\n\n");
+ printf("\nusage:\n meantools differentiate [-d derivatives] [-V variables] [-C] [config_file]\n meantools eval [-R values] [-P precision] [-E max_exponent] [config_file]\n meantools expand [-N namespace] [config_file]\n\n");
return(0);
}
-
-
-