Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nik karasyov exam 7 #8

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Nik karasyov exam 7 #8

wants to merge 17 commits into from

Conversation

a-badin
Copy link
Collaborator

@a-badin a-badin commented Dec 17, 2021

No description provided.

Copy link
Collaborator Author

@a-badin a-badin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Правьте замечания и сливайте в main

double &scale;
std::pair<int, int> &size;
public:
SecondDimensionDecartDrawer(auto *f, double &scale, std::pair<int, int> &size);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вы шаблонный конструктор объявили, может f можно как-то ограничить

class SecondDimensionDecartDrawer: SecondDimensionDrawer{
private:
double &scale;
std::pair<int, int> &size;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

храните по значению, не такая большая структура

#pragma once
class PolarDrawer: SecondDimensionDrawer{
private:
double **values;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::vector

private:
double **values;
public:
virtual Drawer(double **parsed_data);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

виртуальный конструктор не имеет смысла. У вас в любом случае при создании объекта вызывается его конструктор, затем все конструкторы всех родителей

Gnuplot gp;

std::vector<boost::tuple<double, double> > graph;
double left_border = this->size.first * -1 / 2;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

писать this-> не нужно

int main() {
Gnuplot gp;

std::vector<boost::tuple<double, double, double, double> > pts_A;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tuple есть в std

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants