Implementation Of Differentiation & Integration(Calculus) In C++ - algorithm

Is there any suitable Algorithm for Integration & Differentiation which I could implement by C++ or C. Just name it with reference. I would be very happy with your answer & explanation if you kind enough to provide a sample code. Thanks in advance.

You can use Calculus c++ library.
It is easy to use. You can declare variables as Variable x="x",y="y";, and functions as Function f=sin(x)*sin(y);.
And you can differentiate it for example with respect to x as
Function dfdx= f->get_partial_derivative(x);

Related

How is is_standard_layout implemented?

In general one can implement typical type_traits using template techniques.
However I didn't imagine how std::is_standard_layout could be implemented in these terms. http://en.cppreference.com/w/cpp/types/is_standard_layout
When I checked the gcc standard library, I found that it is implemented in terms of __is_standard_layout(T) which I could not find defined anywhere else. Is this a compiler magic function?
Would it be possible to implement std::is_standard_layout explicitly?
For example one of the conditions is that it inherits from a single class.
That seems to be impossible to determine at compile time.
No, std::is_standard_layout is not something you can implement without compiler intrinsics. As you've correctly pointed out, it needs more information than the C++ type system can express.

Using hashing algorithm in CAPL (CANoe)

I want to implement a hashing algorithm like md5 in CAPL (CANoe). Is there any built-in hashing function in CAPL?
I would suggest to create a CAPL Dll which implements your hash-algorithm in C++ and include it via #pragma library() in your code.
There is an example in "CANoe Sample Configurations\Programming\CAPLdll". For more infos take a look at the chapter "CAPL DLL" in your CANoe help.
There is not a built in hash function in CAPL, the closest I've been able to find is a checksum calculation function. (J1939CalcChecksum) Anyhow you can use the CANoe .NET API, once you are using .NET you can call its hashing libraries.
The reference for CANoe .NET API is in Vector's page in the provided link.

Using Datalog by itself, is it possible?

I am currently studying Datalog for my report in class, I only need to discuss basic syntax and a basic example.
I know Datalog is usually used as a query language and is usually only implemented to other languages such as Java, Lua, C, etc. but is it possible to teach Datalog only by itself, or am I required to use another language implementing it to show a simple working program?
There are a few online demos you can use:
http://iris-reasoner.org/demo
http://ysangkok.github.io/mitre-datalog.js/wrapper.html
https://repl.logicblox.com/ (docs here:
https://developer.logicblox.com/content/docs4/tutorial/repl/section/split.html )
I haven't tried it myself yet, but http://abcdatalog.seas.harvard.edu also looks nice and easy to run.
A complete overview is on Wikipedia: https://en.wikipedia.org/wiki/Datalog

E programming language - overview

I need a basic overview of E programming language - http://en.wikipedia.org/wiki/E_%28programming_language%29
Could please someone that has used it, or knows its syntax give me a brief example of the following things:
Declaring and assigning values to variables: integer, floating point, string.
Conditional and loop statements,
Functions - syntax, writing and using functions, example,
Arrays - syntax, definition, example
I know that there is already info about this in their website, but they seem to have just written it without much examples or explanations.
Also could you please point me to a site, where I can download an E compiler, in order to play a little bit with the syntax and get some exercise in writing basic programs (the links in their website are all broken/moved etc.)
Thank you for your time.
Best regards!
you can use the link
e programming

windows programming without a OOP language

Which language ( that is not oop ) should I consider using for writing gui windows apps ?
I guess the obvious answers are visual basic and C , but am wondering if I should look into anything else
am not saying OOP sucks or anything. I just don't.. not using it. The END
ty
Edit: I just want a language that has a non oop paradigm option and that is/can be used to write a windows gui application .
It is quite possible to write procedural code in any language.
There is FreeBasic
I'd personally recommend giving Fortran a go, it's quite nice...
I'd use Python. Sure it can be used in a OO way (as pretty much all other languages can as well), but it's pretty easy to write clean, simple, procedural code with it as well.
C would be my choice, Visual Studio supports it and has an excellent debugger. There are also plenty of examples out on the web in C for Windows programming so you'll have the easiest time getting your code to work.
OO is kind of a pervasive paradigm these days. It's pretty much impossible to avoid, even languages like VB and C can be used to program in an OO way, although I do get what you mean. Have you considered Fortran? COBOL? J? Perl? Python? They can all pretty much be used in a non OO way.
Not to mention assembly language.
F# I guess, avoiding its inherent object-oriented programming model. But do you like functional languages and the .NET framework?!
Out of curiosity, why do you need such a thing?
Windows programming is OO by design. Even if you use C, all the API functions work like OO.
Every handle has a corresponding Create function
CloseHandle if used to close any object, not just a specific type
And finally every single API function gets a Handle to a relevant object, just like the old implementation of OO in pure C with structs - the equivalent of this.
Well, there are guys who are still using Visual Foxpro, or Visual Basic 6 (which is NOT OO, contrary to what some people say).
C and Windows API. It is not OO, but feels like, because OO (C++, Java, C#) is nothing but making structs into objects.

Resources