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

Add curved smell propagation #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kaeruB
Copy link

@kaeruB kaeruB commented Oct 19, 2019

No description provided.

logger.info(WorkerActor.MetricsMarker, logHeader)

import net.ceedubs.ficus.Ficus._
Try(forminConfig.as[ConfigType]("config")) match {
Try(parsedConfig.as[ConfigType]("config")) match {
case Success(parsedConfig) =>
Copy link
Owner

Choose a reason for hiding this comment

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

Zmiana nazwy zmiennej wyżej jak najbardziej słuszna, ale tutaj teraz będzie shadowing zmiennej. Może w tej linijce zmienić parsedConfig na config?

@@ -16,6 +16,11 @@ trait XinukConfig {
def iterationsNumber: Long
}

trait XinukConfigWithBendFactors extends XinukConfig {
def crossBendFactor: Double
def straightBendFactor: Double
Copy link
Owner

Choose a reason for hiding this comment

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

Zastanawiam się, czy nie byłoby prościej dodać te wartości do podstawowego XinukConfigu - jeżeli symulacja nie skorzysta z zakrzywiania sygnału, to po prostu zostaną zignorowane. Idąc krok dalej, gdyby zakrzywiony zapach ustalić jako domyślny, podstawiając 0.0 pod te wartości chyba otrzymamy z powrotem oryginalny wzór bez zakrzywiania, chociaż pewnie mniej wydajnie liczony (wyliczanie zerowych składników vs. z góry pomijanie zerowych składników).

import scala.collection.immutable.TreeSet
import scala.util.{Failure, Success, Try}

class SimulationWithCurvedSmellPropagation[ConfigType <: XinukConfig : ValueReader](
Copy link
Owner

Choose a reason for hiding this comment

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

Jeżeli dodatkowe pola konfiguracji dodamy do bazowego XinukConfigu, to unikniemy tworzenia całej tej klasy.

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

2 participants