Skip to content

[FR] Function overloading for init() method #61

@aniketsharma00411

Description

@aniketsharma00411

Currently, we can only initialize a Matrix object using <std::vector<std::vector<double>> or <std::vector<std::vector<std::string>>.
So, if I want to create a Matrix with 1 row and 1 column I need to create a 2-D vector object and then use the init() method which seems a bit redundant.

Describe the solution you'd like

Overload init() method such that we can use a double, std::string, std::vector<double> and std::vector<std::string> to initialize a Matrix object.

Expectation

After completion, init(2) should give me a Matrix object with 1 element. Similarly, for 1-D vectors.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions