Coder Social home page Coder Social logo

lfla's People

Contributors

darrengzy avatar guitang-lan avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

guitang-lan cqian

lfla's Issues

L() constructor

L() function should allow no arguemnt, which means return to me a zero vector space

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.

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.

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.

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.

Dot operators

Dot operators like .* ./ .+ .- haven't been implemented.

function return type

function foo(var a)
{
return a;
}

funciton main()
{
vector b = foo(1);
}

should not allow this circumstance.

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 ?

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.