lfla's People
lfla's Issues
consistence of tolerance
We use tolerance to determine whether a number is zero in many places, especially in the python file. We should use a global one such that they are consistent everywhere.
function return type
function foo(var a)
{
return a;
}
funciton main()
{
vector b = foo(1);
}
should not allow this circumstance.
the built in function solving linear equation has not been implemented
the built in function solving linear equation has not been implemented in scanner and parser?
About the parser.ml
As I mentioned before, the parser can not recognize the expression a = [1,2,3,4] which is not a declaration. The problem is still there. Or shall we revise the manual to prohibit such usage?
Check builtin function types
Array length and element type check when declaring
e.g. var a[4] = {2, 2.4, b, c};
should make sure there are 4 elements, and each element is a var.
the test case test_vecspace.add.la does not pass
Function arguments problem
when calling function, haven't check the number of arguments and the type of arguments
test_sample1
line 7 and line 10 seems strange, line 7 just declare a variable vs, but did not assign it any value, it should have value of something like null, but line 10 use vectors[i]@vs, the compiler should report error ?
reference manual add + for vector space
L() constructor
L() function should allow no arguemnt, which means return to me a zero vector space
error on the inner product
The file parser.mly line196 has some error. For inner product, we are supposed to use as id<< vector1,vector2>>. So May be we also need extra type in the ast.ml for inner product, because we need to remember the id.
inspace.py product function
!/usr/bin/python
import sys
sys.path.append('./lib')
from InSpace import *
from AffSpace import *
def main() :
v1=np.array([1,0,0])
v2=np.array([0,1,0])
v3=np.array([0,0,1])
mat=np.matrix(((1,0,0),(0,1,0),(0,0,1)))
vecs=[v1,v2,v3]
ins=InSpace(vecs,mat)
v4=np.array([2,3,4])
v5=np.array([-1,1,2])
print(ins.product(v4,v5))
main()
run a.out, it says "Please check dimensions of vectors and matrix".
This is the tests/test_inspace_construction.la test result.
the reference manual did not mention the dim function for vector space
dim function should apply to vector and vector space, affine space and inner product space
Assign to array elements
Assign to array elements haven't been implemented.
Dot operators
Dot operators like .* ./ .+ .- haven't been implemented.
For Loop syntax changes
before:
for var a = 1:5
{ print(a); }
now:
var a;
for a = 1:5
{print(a);}
test_vescpace_constructor vs4 constructor for array is not OK
The test case test_inspace_construction.la can not pass
It said "Fatal error: exception Parsing.Parse_error "
vector assign
vector a;
a = [1,2,3];
check continue, break context
check if continue, break are in the for loop, if, or while loop environment
Liebraket
test case LieBracket.la can not pass
vector space built in function L()
I think beside usage L(v1,v2,v3) where v1,v2,v3 are vectors, we should also allow use L( b), where b is a variable of type array of vectors.
belongs in VecSpace.py
belongs function in VecSpace.py doesn't work properly
dim function is not yet implemented for vector, vector space , affine space and inner product space
test case matrix_addition.la can not pass
It said " Fatal error: exception Parsing.Parse_error"
matrix action is missing
the action of matrix on vector use operator &, it is missing from the scanner and parser
built in function basis(vecspace vs)
Should add to built in function basis(vecspace vs) to scanner and parser
matrix .* matrix
how to implement dot multiple
The test case test_vecspace_constructor.la has wrong result
the last line should not just print [ ]. It is the basis of vs4 which is L(vecs), and vecs = {v1,v2}.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.