Skip to content

Add files via upload#2

Open
AnastasiiaRazheva wants to merge 19 commits intomasterfrom
AnastasiiaRazheva-patch-1
Open

Add files via upload#2
AnastasiiaRazheva wants to merge 19 commits intomasterfrom
AnastasiiaRazheva-patch-1

Conversation

@AnastasiiaRazheva
Copy link
Contributor

Test comit.
Aadded a short description of the future module in ToolButtonList.prototype.help

Test comit. 
Aadded a short description of the future module in ToolButtonList.prototype.help
Copy link
Member

@eakarpov eakarpov left a comment

Choose a reason for hiding this comment

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

Обнови сразу зависимость ядра до 1.0.12 и поменяй импорты:
TaskTemplate -> Template
TaskToolbar -> Toolbar

@eakarpov eakarpov added the enhancement New feature or request label Apr 9, 2019
@eakarpov eakarpov added this to the Версия 1.0.0 milestone Apr 9, 2019
@AnastasiiaRazheva
Copy link
Contributor Author

npm v graphlabs.core.template
dist-tags: latest: 1.0.16

Насчёт TaskTemplate -> Template
import Template
Модуль ""../../../../../../../../Users/Russi/OneDrive/\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u044B/\u0423\u0418\u0420/0.1/Tasks.Planarity-master/node_modules/graphlabs.core.template/build"" не имеет экспортированного элемента "Template".ts(2305)

AnastasiiaRazheva and others added 7 commits May 7, 2019 03:52
Исправила Замечания по синтаксису.

Пыталась подключить для поиска циклов функцию dfs - но это не так просто. Пока оставлю так.
Я все выходные на это убила, но оно начало работать.
Интерфейс и оптимизация кода завтра.
Удалила отладочные строки.
Переименовала, чтобы было без "_".
Добавила RadioButton - пока толком не работают ((.
Перенесла всё в класс BetaGraph.
Добавила разбиение Графа в случае наличия моста.
Я перенесла проверку планарности в componentDidMount
@eakarpov eakarpov self-requested a review May 23, 2019 07:10
src/Segment.tsx Outdated

export class Segment {

bodyEdges: IEdgeView[] = [];
Copy link
Member

Choose a reason for hiding this comment

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

где модификаторы доступа все? непонятно, что можно использовать что нет снаружи

this.findSegments();
}

if (this.segments.length == 0){
Copy link
Member

Choose a reason for hiding this comment

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

===


this.vertices = this.vertices.filter((v: IVertexView) => this.edges.find((e: IEdgeView) => e.vertexOne == v.name || e.vertexTwo == v.name ));

var numVerticesDeleted: number = 0;
Copy link
Member

Choose a reason for hiding this comment

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

var думаю здесь не оправдан


this.edges = this.edges.filter((e: IEdgeView) => this.vertices.find((v: IVertexView) => v.name === e.vertexOne ) && this.vertices.find((v: IVertexView) => v.name === e.vertexTwo ));

} while(numVerticesDeleted != 0);
Copy link
Member

Choose a reason for hiding this comment

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

!==

this.edges.filter(nonUsedEdge => !this.usedEdges.find(e => e == nonUsedEdge)).forEach(nonUsedEdge => {
if (this.usedVertices.find(v => nonUsedEdge.vertexOne == v.name) && this.usedVertices.find(v => nonUsedEdge.vertexTwo == v.name)){
this.segments.push(new Segment([nonUsedEdge],
[this.vertices.find(v => v.name == nonUsedEdge.vertexOne),
Copy link
Member

Choose a reason for hiding this comment

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

может сделать просто filter чем четыре раза проходиться по массиву?

} else
{
resultCycle.vertices = resultCycle.vertices.concat([this.vertices.find((v: IVertexView) => v.name === nextEdge.vertexOne)]);
colored = colored.concat([this.vertices.find((v: IVertexView) => v.name === nextEdge.vertexOne)]);
Copy link
Member

Choose a reason for hiding this comment

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

filter лучше опять-таки

this.usedVertices = this.usedVertices.concat(minValueSegment.bodyVertices.slice(1, minValueSegment.bodyVertices.length - 1));
this.usedEdges = this.usedEdges.concat(minValueSegment.bodyEdges.slice());

var newVertices1 : IVertexView[];
Copy link
Member

Choose a reason for hiding this comment

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

let variable: Type;
и что за newVertices1? Какой подход к нумерации? Комментарии или переименовать.


this.findSegments();

var counter = 0;
Copy link
Member

Choose a reason for hiding this comment

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

let


var counter = 0;

while (this.segments.length != 0 && !this.segments.find(s => s.value == 0) && counter < 100){
Copy link
Member

Choose a reason for hiding this comment

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

!==, ===

var resultSegment: Segment = new Segment([], [startPoint], startPoint, null);
let blackList: IEdgeView[] = [];

let nameOfBlockedVertex: string = null;
Copy link
Member

Choose a reason for hiding this comment

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

предполагаю что тип string|null

AnastasiiaRazheva and others added 11 commits June 11, 2019 00:36
Исправление замечаний по результату ревью от Егора Карпова
Код для будущего оценивания ответов студентов. В рамках летней практики.
Обновила шаблон и запилила логи
Обновила template до 1.0.32
Добавила graphlabs.core.graphs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants